Giter Site home page Giter Site logo

Comments (15)

frogythegreat avatar frogythegreat commented on August 31, 2024

After removing the whitespace in front of the postgresql block, the utility loads, but doesn't appear to submit anything to new-relic, (from the log):
INFO 2013-06-19 19:09:45 1514 MainProcess MainThread newrelic_plugin_agent.agent process L91 : Polling
INFO 2013-06-19 19:09:45 1514 MainProcess MainThread newrelic_plugin_agent.agent send_components L174 : Sending 0 metrics to NewRelic
INFO 2013-06-19 19:09:45 1514 MainProcess MainThread newrelic_plugin_agent.agent process L105 : All stats processed in 0.18 seconds, next wake in 59.82

From clihelper-exceptions.log:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/clihelper/init.py", line 735, in run
with daemon.DaemonContext(**kwargs):
File "/usr/local/lib/python2.7/dist-packages/daemon/daemon.py", line 354, in enter
self.open()
File "/usr/local/lib/python2.7/dist-packages/daemon/daemon.py", line 346, in open
self.pidfile.enter()
File "/usr/local/lib/python2.7/dist-packages/lockfile/init.py", line 226, in enter
self.acquire()
File "/usr/local/lib/python2.7/dist-packages/lockfile/linklockfile.py", line 20, in acquire
raise LockFailed("failed to create %s" % self.unique_name)
LockFailed: failed to create /var/run/dvpsql06-b09eb700.1575
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/clihelper/init.py", line 735, in run
with daemon.DaemonContext(**kwargs):
File "/usr/local/lib/python2.7/dist-packages/daemon/daemon.py", line 354, in enter
self.open()
File "/usr/local/lib/python2.7/dist-packages/daemon/daemon.py", line 346, in open
self.pidfile.enter()
File "/usr/local/lib/python2.7/dist-packages/lockfile/init.py", line 226, in enter
self.acquire()
File "/usr/local/lib/python2.7/dist-packages/lockfile/linklockfile.py", line 20, in acquire
raise LockFailed("failed to create %s" % self.unique_name)
LockFailed: failed to create /var/run/dvpsql06-5fdad700.1640

from newrelic-plugin-agent.

hermanschutte avatar hermanschutte commented on August 31, 2024

Are you running it as root? Try killing the process and running it with:

sudo newrelic_plugin_agent -c /etc/newrelic_plugin_agent.yml

from newrelic-plugin-agent.

frogythegreat avatar frogythegreat commented on August 31, 2024

running the command as:
$ sudo newrelic_plugin_agent -c /etc/newrelic_plugin_agent.yml

starts without the LockFailed error. However, it still doesn't report anything to NR, and the log still contains the same 6 lines every minute.

INFO 2013-06-19 19:29:23 1781 MainProcess MainThread newrelic_plugin_agent.agent process L91 : Polling
INFO 2013-06-19 19:29:23 1781 MainProcess MainThread newrelic_plugin_agent.agent send_components L174 : Sending 0 metrics to NewRelic
INFO 2013-06-19 19:29:23 1781 MainProcess MainThread newrelic_plugin_agent.agent process L105 : All stats processed in 0.13 seconds, next wake in 59.87

There is traffic against the DB. Should I see anything additional in the logs?

from newrelic-plugin-agent.

frogythegreat avatar frogythegreat commented on August 31, 2024

heh. was trying that as you sent the comment :-)

from newrelic-plugin-agent.

gmr avatar gmr commented on August 31, 2024

It seems the user you're trying to gather stats as may not have access? Try using the postgres user? Also you can change the log level from INFO to DEBUG in the config and that may help track it down.

from newrelic-plugin-agent.

frogythegreat avatar frogythegreat commented on August 31, 2024

Oh, one environment thing that may be relevant. We're running postgresql on port 5433, and pg_pool on 5432. Thx for the feedback!

from newrelic-plugin-agent.

gmr avatar gmr commented on August 31, 2024

Make sure you change the port in the config from 5432 to 5433 then, in the config above it is not set that way.

from newrelic-plugin-agent.

frogythegreat avatar frogythegreat commented on August 31, 2024

postgresql:
host: localhost
port: 5433
user: postgres
password: *********
dbname: ****

tweaked the config and restarted. Same log output.

Again, thx guys :-) this plugin is gonna be a huge time saver once I get it working!

from newrelic-plugin-agent.

gmr avatar gmr commented on August 31, 2024

What version of PostgreSQL?

Can you change the log level from INFO to DEBUG in the config and paste any
non-sensitive output?

from newrelic-plugin-agent.

frogythegreat avatar frogythegreat commented on August 31, 2024

Log with debug on:

INFO 2013-06-19 19:50:45 1989 MainProcess MainThread newrelic_plugin_agent.agent process L91 : Polling
DEBUG 2013-06-19 19:50:45 1989 MainProcess MainThread newrelic_plugin_agent.agent send_data_to_newrelic L166 : Done, will send remainder of 0 metrics
INFO 2013-06-19 19:50:45 1989 MainProcess MainThread newrelic_plugin_agent.agent send_components L174 : Sending 0 metrics to NewRelic
DEBUG 2013-06-19 19:50:45 1989 MainProcess MainThread newrelic_plugin_agent.agent send_components L176 : {'components': [], 'agent': {'host': 'dvpsql06', 'version': '1.0.11', 'pid': 1989}}
DEBUG 2013-06-19 19:50:45 1989 MainProcess MainThread newrelic_plugin_agent.agent send_components L183 : Response: 200: '{"status":"ok"}'
INFO 2013-06-19 19:50:45 1989 MainProcess MainThread newrelic_plugin_agent.agent process L105 : All stats processed in 0.13 seconds, next wake in 59.87

from newrelic-plugin-agent.

gmr avatar gmr commented on August 31, 2024

Well that's not very helpful. I'll add some additional logging in and we can try and isolate what is going on.

from newrelic-plugin-agent.

frogythegreat avatar frogythegreat commented on August 31, 2024

Oh, Also:
:~$ psql --version
psql (PostgreSQL) 9.1.7

from newrelic-plugin-agent.

oppianmatt avatar oppianmatt commented on August 31, 2024

I don't think this is a postgres issue as I'm trying to get stats for memcached (amongst others) and I'm getting 0 stats collected.:

sudo newrelic_plugin_agent -f -c /etc/newrelic/newrelic_plugin_agent.cfg
INFO       2013-06-20 16:00:50 21411  MainProcess     MainThread clihelper                                     run                       L382   : newrelic_plugin_agent 1.0.11 started
INFO       2013-06-20 16:00:50 21411  MainProcess     MainThread newrelic_plugin_agent.agent                   process                   L91    : Polling
DEBUG      2013-06-20 16:00:50 21411  MainProcess     MainThread newrelic_plugin_agent.agent                   send_data_to_newrelic     L166   : Done, will send remainder of 0 metrics
INFO       2013-06-20 16:00:50 21411  MainProcess     MainThread newrelic_plugin_agent.agent                   send_components           L174   : Sending 0 metrics to NewRelic
DEBUG      2013-06-20 16:00:50 21411  MainProcess     MainThread newrelic_plugin_agent.agent                   send_components           L176   : {'components': [], 'agent': {'host': 'XXXX.co.uk', 'version': '1.0.11', 'pid': 21411}}
INFO       2013-06-20 16:00:50 21411  MainProcess     MainThread requests.packages.urllib3.connectionpool      _new_conn                 L523   : Starting new HTTPS connection (1): platform-api.newrelic.com
DEBUG      2013-06-20 16:00:50 21411  MainProcess     MainThread requests.packages.urllib3.connectionpool      _make_request             L283   : "POST /platform/v1/metrics HTTP/1.1" 200 16
DEBUG      2013-06-20 16:00:50 21411  MainProcess     MainThread newrelic_plugin_agent.agent                   send_components           L183   : Response: 200: '{"status":"ok"}'
INFO       2013-06-20 16:00:50 21411  MainProcess     MainThread newrelic_plugin_agent.agent                   process                   L105   : All stats processed in 0.41 seconds, next wake in 59.59

Our config:

memcached:
 name: localhost
 host: localhost
 port: 11211

from newrelic-plugin-agent.

gmr avatar gmr commented on August 31, 2024

@oppianmatt each plugin tries to get stats independently. In 1.0.14 (released last night) it will give more info on why it fails for memcached and a few other plugins. Please use caution in upgrading (read the README file here: https://github.com/MeetMe/newrelic-plugin-agent/blob/master/README.md

from newrelic-plugin-agent.

oppianmatt avatar oppianmatt commented on August 31, 2024

upgraded to 1.0.14 successfully but still no luck and no info why. Open a new issue with all the configs/logs as to not hijack this posgres one: #97

from newrelic-plugin-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.