Thank you for your interest in contributing to the Azure Monitor MCP Agent! This guide will help you get started.
- Python 3.8 or higher
- Git
- Azure OpenAI Service account (for AI features)
- Azure Log Analytics workspace (for testing)
git clone https://github.com/noakup/NoaAzMonAgent.git
cd NoaAzMonAgent# Install dependencies
pip install -r requirements.txt
# Copy environment template
copy .env.template .env
# Edit .env with your Azure credentials (see setup section below)Add these to your .env file:
AZURE_OPENAI_ENDPOINT=https://your-openai-resource.openai.azure.com/
AZURE_OPENAI_KEY=your-api-key-here
AZURE_OPENAI_DEPLOYMENT=gpt-35-turboYou'll need a Log Analytics Workspace ID for testing:
# Optional: Add your test workspace ID
LOG_ANALYTICS_WORKSPACE_ID=your-workspace-guid-here# Start the web application
python web_app.py
# Open browser to http://localhost:8080
# Test with your Log Analytics Workspace ID-
Create a new branch:
git checkout -b feature/your-feature-name
-
Make your changes:
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
-
Test your changes:
# Test specific functionality python test_your_feature.py # Test web interface python web_app.py
-
Commit and push:
git add . git commit -m "feat: description of your feature" git push origin feature/your-feature-name
-
Create a Pull Request:
- Go to the GitHub repository
- Click "New Pull Request"
- Fill out the PR template
- Request review
├── web_app.py # Main web application
├── logs_agent.py # Natural language processing
├── templates/ # Web UI templates
│ └── index.html # Main web interface
├── azure_agent/ # Azure integration
│ └── monitor_client.py # Log Analytics client
├── app_*_kql_examples.md # KQL example files
├── requirements.txt # Python dependencies
└── .env.template # Environment template
- New KQL Example Categories: Add examples for specific Azure services
- UI/UX Improvements: Enhance the web interface design
- Performance Optimization: Improve query performance and caching
- Error Handling: Better error messages and recovery
- Documentation: Improve guides and API documentation
- Testing: Add more comprehensive tests
- Features: New functionality like saved queries, dashboards
- Integrations: Support for other AI models or Azure services
- Fix typos or improve documentation
- Add new KQL examples
- Improve CSS styling
- Add validation for user inputs
-
Web Interface:
python web_app.py # Test at http://localhost:8080 -
Natural Language Translation:
python test_translation.py
-
Azure Integration:
python test_query.py
# Run all tests
python -m pytest
# Run specific test
python test_specific_feature.py- Follow PEP 8
- Use meaningful variable names
- Add docstrings to functions
- Keep functions focused and small
Use conventional commits:
feat:for new featuresfix:for bug fixesdocs:for documentationstyle:for formatting changesrefactor:for code refactoringtest:for adding tests
git commit -m "feat: add support for custom KQL queries in UI"
git commit -m "fix: resolve timeout issue in Azure Log Analytics queries"
git commit -m "docs: update setup instructions for Azure OpenAI"- Check existing issues to avoid duplicates
- Use the issue template when creating new issues
- Provide detailed information:
- Steps to reproduce
- Expected vs actual behavior
- Environment details
- Error messages or logs
- GitHub Issues: For bugs and feature requests
- Discussions: For questions and general discussion
- Code Review: PRs are reviewed promptly
- Never commit API keys or credentials
- Use
.envfile for sensitive data - Review
.gitignoreto ensure secrets aren't tracked
By contributing, you agree that your contributions will be licensed under the same license as the project.
Thank you for contributing! 🎉
Your contributions help make the Azure Monitor MCP Agent better for everyone.