Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

NRI Integration: mongodb - error log/status?

mongodb

#1

New Relic Infrastructure Question Template

Note that this is running a single-instance inMemory config without any authentication turned on

instances:
  - name: dev3
    # Available commands are "all", "metrics", and "inventory"
    command: all
    arguments:
      # The mongos to connect to
      host: localhost
      # The port the mongos is running on
      port: 27017
      # The username of the user created to monitor the cluster.
      # This user should exist on the cluster as a whole as well
      # as on each of the individual mongods.
      username: 
      # The password for the monitoring user
      password: 
      # The database on which the monitoring user is stored
      auth_source: admin
      # Connect using SSL
      ssl: false
      # Skip verification of the certificate sent by the host.
      # This can make the connection susceptible to man-in-the-middle attacks, 
      # and should only be used for testing
      ssl_insecure_skip_verify: true
      # Path to the CA certs file
      ssl_ca_certs: ''
      # A JSON map of database names to an array of collection names. If empty, 
      # defaults to all databases and collections. If the list of collections is null,
      # collects all collections for the database. 
      filters: ''
    labels:
      env: production
      label: inMemory

#2

Try commenting out the ssl_insecure_skip_verify and ssl_ca_certs lines.


#3

Good thought, but no, that doesn’t help. Might have to wait till a NR support person can drop by the tread to see if this is even possible. @rdouglas, know who might be able to help?


#4

Hi @AllCare, I notice you don’t have the first line in the config:

integration_name: com.newrelic.mongodb

Could you add this and retry please? If you could check your logs for any obvious errors as well that would be great as well :slight_smile:


#5

It looks like a username is required. This makes it not possible to use in situations like mine:

time=“2019-01-16T17:14:01-05:00” level=info msg=“New Relic Infrastructure Agent version 1.1.19 Creating Service (966.368µs)”
time=“2019-01-16T17:14:01-05:00” level=info msg=“Agent service manager started successfully. (1.262076ms)” service=newrelic-infra
time=“2019-01-16T17:14:01-05:00” level=info msg=“New Relic Infrastructure Agent version 1.1.19 Initializing (1.481864ms)”
time=“2019-01-16T17:14:02-05:00” level=info msg=“New Relic Infrastructure Agent version 1.1.19 Running (347.522742ms)”
time=“2019-01-16T17:14:02-05:00” level=warning msg=“unable to use SELinux” error=“exec: “sestatus”: executable file not found in $PATH”
time=“2019-01-16T17:14:02-05:00” level=error msg=“executing data source” data prefix=integration/com.newrelic.mongodb error=“exit status 1” plugin name=dev3
stderr="[ERR] Invalid arguments: must provide a username argument\n"


#6

Hi @AllCare it would be worth checking out our documentation on mongodb users and privileges, hope this helps :slight_smile: