memcached Host Template and Graphs (ver 1.0)

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

linebacker2
Posts: 28
Joined: Fri May 08, 2009 11:34 am

Re: memcached Host Template and Graphs (ver 1.0)

Post by linebacker2 »

Hi

I am trying to get memcached graphing with cacti but the graphs are appearing but not populating. Instead I get "-1.#J" values.
When checking the log I see the following:

11/14/2011 05:30:07 PM - CMDPHP: Poller[0] Host[72] Description[TEST_SERVER_01 (memcashed)] DS[798] Graphs['TEST_SERVER_01 (memcashed) - Memcached Items Cached'] CMD: python C:/inetpub/cacti/scripts/memcached.py 172.18.100.33, output: U
11/14/2011 05:30:07 PM - CMDPHP: Poller[0] Host[72] Description[TEST_SERVER_01 (memcashed)] DS[798] Graphs['TEST_SERVER_01 (memcashed) - Memcached Items Cached'] WARNING: Result from CMD not valid. Partial Result: U

When I try to query the server from the command line I get the following error message:

C:\inetpub\cacti\scripts>c:\Python27\python memcached.py 172.18.100.33
Traceback (most recent call last):
File "memcached.py", line 44, in <module>
stats[key] = float(mstat[key])
KeyError: 'rusage_user'

Please help resolve this issue...


I am running Cacti 0.8.7g, Python 2.7.2, Python setuptools-0.6c11, using cmd.php as my poller running every 5 minutes.
cfanbo
Posts: 1
Joined: Sun Mar 27, 2011 5:32 am

Re: memcached Host Template and Graphs (ver 1.0)

Post by cfanbo »

i'm get some errors,on FREEBSD system

Code: Select all

[root@www /data/cacti]# python scripts/memcached.py 192.168.0.71
Traceback (most recent call last):
  File "scripts/memcached.py", line 4, in <module>
    import memcache
ImportError: No module named memcache
yraffah
Posts: 2
Joined: Tue Jun 05, 2012 9:30 am

Re: memcached Host Template and Graphs (ver 1.0)

Post by yraffah »

I'm sorry to bump an old thread but something is not working with me!

When I invoke the following command, I get the results.

Code: Select all

$ su - cacti
Password:
$ python /www/cacti/scripts/memcached.py localhost
total_items:586 get_hits:500 uptime:429441 cmd_get:1086 time:1338906821 bytes:435 curr_connections:5 connection_structures:7 bytes_written:163043 limit_maxbytes:1073741824 cmd_set:586 curr_items:2 rusage_user:4.492317 get_misses:586 rusage_system:5.612146 bytes_read:140140 total_connections:6547
However, in Cacti it is showing the following

Code: Select all

06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[52] WARNING: Result from CMD not valid.  Partial Result: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[52] CMD: python /usr/local/share/cacti/scripts/memcached.py localhost, output: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[53] WARNING: Result from CMD not valid.  Partial Result: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[53] CMD: python /usr/local/share/cacti/scripts/memcached.py localhost, output: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[54] WARNING: Result from CMD not valid.  Partial Result: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[54] CMD: python /usr/local/share/cacti/scripts/memcached.py localhost, output: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[55] WARNING: Result from CMD not valid.  Partial Result: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[55] CMD: python /usr/local/share/cacti/scripts/memcached.py localhost, output: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[50] WARNING: Result from CMD not valid.  Partial Result: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[50] CMD: python /usr/local/share/cacti/scripts/memcached.py localhost, output: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[51] WARNING: Result from CMD not valid.  Partial Result: U
06/06/2012 11:45:21 AM - CMDPHP: Poller[0] Host[3] DS[51] CMD: python /usr/local/share/cacti/scripts/memcached.py localhost, output: U
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests