Skip to content

feat: Add Azure Application Insights KQL query tool for AKS clusters #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 19, 2025

Conversation

thomas1206
Copy link
Contributor

  • Implement az_monitor_app_insights_query MCP tool
  • Add comprehensive KQL query safety validation
  • Support time-based filtering with RFC3339/ISO 8601
  • Integrate with existing security and access level framework
  • Add comprehensive test suite with 26 test cases
  • Support all Application Insights telemetry types

Features:

  • Execute KQL queries against Application Insights telemetry data
  • Query safety validation (blocks dangerous keywords)
  • Parameter validation and error handling
  • Time format validation (RFC3339/ISO 8601)
  • Integration with readonly, readwrite, and admin access levels
  • Support for all telemetry types (requests, dependencies, exceptions, etc.)

Security:

  • KQL query safety checks prevent dangerous operations
  • Table name validation ensures valid Application Insights tables
  • Comprehensive parameter validation prevents injection attacks
  • Access level integration with existing security framework

Testing:

  • 12 comprehensive tests with 26 sub-test cases
  • Parameter validation coverage
  • KQL safety validation tests
  • Time format validation tests
  • Tool registration verification

- Implement az_monitor_app_insights_query MCP tool
- Add comprehensive KQL query safety validation
- Support time-based filtering with RFC3339/ISO 8601
- Integrate with existing security and access level framework
- Add comprehensive test suite with 26 test cases
- Support all Application Insights telemetry types

 Features:
- Execute KQL queries against Application Insights telemetry data
- Query safety validation (blocks dangerous keywords)
- Parameter validation and error handling
- Time format validation (RFC3339/ISO 8601)
- Integration with readonly, readwrite, and admin access levels
- Support for all telemetry types (requests, dependencies, exceptions, etc.)

 Security:
- KQL query safety checks prevent dangerous operations
- Table name validation ensures valid Application Insights tables
- Comprehensive parameter validation prevents injection attacks
- Access level integration with existing security framework

 Testing:
- 12 comprehensive tests with 26 sub-test cases
- Parameter validation coverage
- KQL safety validation tests
- Time format validation tests
- Tool registration verification
- Removed validateKQLQuery function and its usage
- Removed all KQL validation related tests
- Application Insights handler now performs only basic parameter validation
@thomas1206 thomas1206 requested review from gossion and feiskyer July 19, 2025 02:08
@thomas1206 thomas1206 merged commit dfae02b into main Jul 19, 2025
9 checks passed
@thomas1206 thomas1206 deleted the thomasmcpdev branch July 19, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants