Memcached template

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

Moderators: Developers, Moderators

Post Reply
User avatar
kieron
Posts: 5
Joined: Thu Apr 19, 2012 4:50 am

Memcached template

Post by kieron »

Hi all,
Im using the memcached templates from (http://dealnews.com/developers/cacti/memcached.html) on a server of mine, but its returning NAN
Now so far I've:
-done the Python Client API Installation
--tar xzf python-memcached-<ver>.tar.gz.
--python setup.py install
-copied the memcached.py script to <cacti path>/scripts/ directory on the server that cacti is installed on
-imported the templates using the import template option

Tried to verify it using python <cacti path>/scripts/memcached.py xxx.xxx.xx.xx
-this didnt return a result or any error
--this should return something like
total_items:2294234 get_hits:28311831 uptime:87089 cmd_get:30903094 time:1335521922 bytes:43813250 curr_connections:51 connection_structures:142 bytes_written:82232602793 limit_maxbytes:52428800 cmd_set:2294234 curr_items:135391 rusage_user:292.826483 get_misses:2591263 rusage_system:1196.32813 bytes_read:2568458154 total_connections:25716822


changed permissions of memcached.py
--chmod 777 memcached.py

checked the log and this is returning empty set
--im not sure why this is happening

The port memcached uses for is default 11211

Any help on this would be appreciated!

Thanks
Last edited by kieron on Fri Apr 27, 2012 5:19 am, edited 1 time in total.
User avatar
kieron
Posts: 5
Joined: Thu Apr 19, 2012 4:50 am

Re: Memcached template

Post by kieron »

Solved
memcached running on:
11211 udp
and
10001 tcp

command to get this:
netstat -tulpn | grep memcached

Changed default port listed in memcached.py from 11211 to 10001:

parser.set_defaults(port = "10001")
parser.add_option("-p", "--port", dest="port", metavar="PORT",
help="default memcached port [default: 10001]")

also edited memcached.py to inlcude:
stats[key] += float(mstat[1][key])
stats[key] += float(mstat[1][key].replace(':','.'))

stats[key] = float(mstat[key])
stats[key] = float(mstat[key].replace(':','.'))
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests