Add Prometheus query as new monitor type #14
                
     Merged
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
✨ Summary
This PR introduces a new monitor type that allows users to run Prometheus queries as health checks. The implementation includes backend support for executing PromQL queries, frontend UI updates to support the new monitor type, and database schema changes to accommodate Prometheus monitoring configuration.
🔧 Key Changes
deploy/kubernetes/postgres.yaml- Updated Kubernetes PostgreSQL deploymentfrontend/src/components/MonitorIcon.tsx- Added icon support for Prometheus monitor typefrontend/src/index.css- Updated CSS styles for new monitor typefrontend/src/types.ts- Added TypeScript types for Prometheus monitoringfrontend/src/views/Edit.tsx- Updated edit view to support Prometheus monitor configurationfrontend/src/views/Monitor.tsx- Updated monitor view to display Prometheus monitoring detailsservices/common/monitor/- Added new Prometheus query monitor implementationservices/common/result/result.go- Updated result handling for Prometheus queriessql/init/nanomon_init.sql- Updated database schema for Prometheus monitoring🌐 Backend/API
prom_query.goandprometheus.gofiles implementing Prometheus query execution📦 Build
Dockerfile.databasewith new database configuration🏗️ Infra & Deployment
👁️ Frontend
📝 Documentation
http://prometheus-server:9090)🆗 Impact
This change significantly expands the monitoring capabilities of Nanomon by allowing users to leverage existing Prometheus infrastructure for health checks. Users can now create monitors that execute PromQL queries and evaluate the results as pass/fail conditions. This integration enables more sophisticated monitoring scenarios and better integration with existing observability stacks. The changes are additive and should not impact existing monitor types or functionality.