Open lukasmrtvy opened 4 months ago
Hi, usage for more than MongoDB is quite tricky ( especially when it comes to Production, Staging, etc databases, these are usually using the same pipeline ), hence my proposal. Thanks
Related: https://github.com/raffis/mongodb-query-exporter/issues/161 https://github.com/raffis/mongodb-query-exporter/issues/60
1. and 2.
servers: - name: staging uri: mongodb://localhost-staging:${STAGING_PASSWORD}:27017 database: staging collection: my coll - name: production uri: mongodb://localhost-production:${PRODUCTION_PASSWORD}:27017 database: production collection: mycoll aggregations: - database: $servers[].database collection: $servers[].collection servers: [$servers[].name] metrics: - name: myapp_example_simplevalue_total ... pipeline: | [ {"$count":"total"} ]
3.
x-pipeline: &pipeline | [ {"$count":"total"} ] servers: - name: staging uri: mongodb://localhost-staging:${STAGING_PASSWORD}:27017 - name: production uri: mongodb://localhost-production:${PRODUCTION_PASSWORD}:27017 aggregations: - database: staging collection: mycoll servers: [staging] metrics: - name: myapp_example_simplevalue_total ... pipeline: | <<: *pipeline - database: production collection: mycoll servers: [production] metrics: - name: myapp_example_simplevalue_total ... pipeline: | <<: *pipeline
Hi, usage for more than MongoDB is quite tricky ( especially when it comes to Production, Staging, etc databases, these are usually using the same pipeline ), hence my proposal. Thanks
Related: https://github.com/raffis/mongodb-query-exporter/issues/161 https://github.com/raffis/mongodb-query-exporter/issues/60
1. and 2.
3.