apiVersion: v1
kind: ConfigMap
metadata:
  name: mongodb-newrelic-integrations-config
  namespace: default
data:
  config.yaml: |
    integration_name: com.newrelic.mongodb
    instances:
      - name: all
        command: all
        arguments:
          username: newrelic
          password: newrelic
          auth_source: admin
          host: mongodb-$CLUSTER_NAME
          port: 27017
        labels:
          env: production
  definition.yaml: |
    name: com.newrelic.mongodb
    description: Reports status and metrics for mongodb service
    protocol_version: 1
    os: linux
    commands:
      all:
        command:
          - ./bin/nr-mongodb
        interval: 15
      metrics:
        command:
          - ./bin/nr-mongodb
          - --metrics
        interval: 15
      inventory:
        command:
          - ./bin/nr-mongodb
          - --inventory
        prefix: config/mongodb
        interval: 15
