Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to collect any stats #97

Closed
oppianmatt opened this issue Jul 22, 2013 · 2 comments
Closed

fails to collect any stats #97

oppianmatt opened this issue Jul 22, 2013 · 2 comments

Comments

@oppianmatt
Copy link

Upgraded to 1.0.14 to see if it would fix the stats collection issue, but it hasn't:

newrelic_plugin_agent -c /etc/newrelic/newrelic_plugin_agent.cfg -f
INFO       2013-07-22 11:05:14 14946  MainProcess     MainThread clihelper                                     run                       L382   : newrelic_plugin_agent 1.0.14 started
INFO       2013-07-22 11:05:14 14946  MainProcess     MainThread newrelic_plugin_agent.agent                   process                   L97    : Polling
DEBUG      2013-07-22 11:05:14 14946  MainProcess     MainThread newrelic_plugin_agent.agent                   send_data_to_newrelic     L186   : Done, will send remainder of 0 metrics
WARNING    2013-07-22 11:05:14 14946  MainProcess     MainThread newrelic_plugin_agent.agent                   send_components           L195   : No metrics to send to NewRelic this interval
INFO       2013-07-22 11:05:14 14946  MainProcess     MainThread newrelic_plugin_agent.agent                   process                   L111   : All stats processed in 0.00 seconds, next wake in 60.00

Running ubuntu 10.04 and python 2.6.5

Here is the config file:

%YAML 1.2

---
Application:
  license_key: [REDACTED]
  poll_interval: 60
  #proxy: http://localhost:8080

  # apache_httpd:
  #   name: hostname
  #   scheme: http
  #   host: localhost
  #   verify_ssl_cert: true
  #   port: 80
  #   path: /server-status

  # couchdb:
  #   name: localhost
  #   host: localhost
  #   verify_ssl_cert: true
  #   port: 5984
  #   username: foo
  #   password: bar

  # edgecast:
  #   name: My Edgecase Account
  #   account: YOUR_ACCOUNT_#
  #   token: YOUR_API_TOKEN

memcached:
  name: localhost
  host: localhost
  port: 11211
  #   path: /path/to/unix/socket

  # mongodb:
  #   name: hostname
  #   host: localhost
  #   port: 27017
  #   databases:
  #     - test
  #     - yourdbname

  # mongodb:   # With Authentication
  #   name: hostname
  #   host: localhost
  #   port: 27017
  #   admin_username: user
  #   admin_password: pass
  #   databases:
  #     test:
  #       username: user
  #       password: pass
  #     yourdbname:
  #       username: user
  #       password: pass

nginx:
  name: hostname
  host: localhost
  port: 80
  verify_ssl_cert: true
  path: /nginx_stub_status

pgbouncer:
  host: localhost
  port: 6000
  user: stats

  # php_apc:
  #   name: hostname
  #   scheme: http
  #   host: localhost
  #   verify_ssl_cert: true
  #   port: 80
  #   path: /apc-nrp.php

postgresql:
  host: localhost
  port: 5432
  user: postgres
  dbname: postgres
  #   superuser: False

  # rabbitmq:
  #   name: rabbitmq@localhost
  #   host: localhost
  #   port: 15672
  #   verify_ssl_cert: true
  #   username: guest
  #   password: guest
  #   detailed: False
  #   resolve_dns: False

redis:
  - name: localhost
    host: localhost
    port: 6379
    db_count: 16
  #     password: foo # [OPTIONAL]
  #     #path: /var/run/redis/redis.sock
  #   - name: localhost
  #     host: localhost
  #     port: 6380
  #     db_count: 16
  #     password: foo # [OPTIONAL]
  #     #path: /var/run/redis/redis.sock

  # riak:
  #   name: localhost
  #   host: node0.riak0.scs.mtmeprod.net
  #   verify_ssl_cert: true
  #   port: 8098

  # uwsgi:
  #   name: localhost
  #   host: localhost
  #   port: 1717
  #   path: /path/to/unix/socket

Daemon:
  user: newrelic
  pidfile: /var/run/newrelic/newrelic_plugin_agent.pid

Logging:
  formatters:
    verbose:
      format: '%(levelname) -10s %(asctime)s %(process)-6d %(processName) -15s %(threadName)-10s %(name) -45s %(funcName) -25s L%(lineno)-6d: %(message)s'
  handlers:
    file:
      class : logging.handlers.RotatingFileHandler
      formatter: verbose
      filename: /var/log/newrelic/newrelic_plugin_agent.log
      maxBytes: 10485760
      backupCount: 3
  loggers:
    newrelic_plugin_agent:
      level: DEBUG
      propagate: True
      handlers: [console, file]
    requests:
      level: ERROR
      propagate: True
      handlers: [console, file]

As you can see even with DEBUG turned on there is little information on what is wrong.

@oppianmatt
Copy link
Author

While I said we have python2.6.5 it seems the file starts with python2.7 which we also have installed.

@gmr
Copy link
Contributor

gmr commented Jul 22, 2013

Spacing is off on your config file. It uses YAML (see yaml.org)

%YAML 1.2
---
Application:
  license_key: [REDACTED]
  poll_interval: 60
  #proxy: http://localhost:8080

  memcached:
    name: localhost
    host: localhost
    port: 11211

  nginx:
    name: hostname
    host: localhost
    port: 80
    path: /nginx_stub_status

  pgbouncer:
    host: localhost
    port: 6000
    user: stats

  postgresql:
    host: localhost
    port: 5432
    user: postgres
    dbname: postgres

  redis:
    - name: localhost
      host: localhost
      port: 6379
      db_count: 16

Daemon:
  user: newrelic
  pidfile: /var/run/newrelic/newrelic_plugin_agent.pid

Logging:
  formatters:
    verbose:
      format: '%(levelname) -10s %(asctime)s %(process)-6d %(processName) -15s %(threadName)-10s %(name) -45s %(funcName) -25s L%(lineno)-6d: %(message)s'
  handlers:
    file:
      class : logging.handlers.RotatingFileHandler
      formatter: verbose
      filename: /var/log/newrelic/newrelic_plugin_agent.log
      maxBytes: 10485760
      backupCount: 3
  loggers:
    newrelic_plugin_agent:
      level: DEBUG
      propagate: True
      handlers: [console, file]
    requests:
      level: ERROR
      propagate: True
      handlers: [console, file]

@gmr gmr closed this as completed Jul 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants