Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Howto for creating graphs for ext perl scripts?

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
justintime



Joined: 11 Aug 2003
Posts: 1

PostPosted: Mon Aug 11, 2003 1:19 pm    Post subject: Howto for creating graphs for ext perl scripts? Reply with quote

Hi all,

I have written a perl script that queries a CMTS for the status of all cable modems on it via SNMP. It loads the info into a hash, and then outputs how many cable modems are online versus offline.

[cacti@www scripts]$ ./docsis_modem_status.pl cmgw.mydomain.com public
up:661 down:22[cacti@www scripts]$

I'm new to Cacti, and RRDTool, and I'm moving this over from MRTG. Is there a step by step guide to setting up the data and graph? I've followed some other posts in the forum, but the graph never works. The data input appears to be though:

[cacti@www log]$ grep down rrd.log
...
alcitycmts_up_61.rrd --template up:down N:212:6
08/11/2003 10:10 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/centralcitycmts_up_61.rrd --template up:down N:212:6
08/11/2003 10:15 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/centralcitycmts_up_61.rrd --template up:down N:212:6
08/11/2003 10:20 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/centralcitycmts_up_61.rrd --template up:down N:211:7
08/11/2003 10:25 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/centralcitycmts_up_61.rrd --template up:down N:212:6
...

Any help would be greatly appreiciated!

TIA,

Justin
Back to top
Kudithipudi



Joined: 11 Jul 2003
Posts: 11

PostPosted: Wed Aug 13, 2003 7:52 am    Post subject: Reply with quote

Hello Justin,
I think this topic should go into the "Help: General" area. I was trying to do the same thing as you did. I solved [worked around] it by doing the following

1) Run external script as a cronjob [scheduler if using windows] and let it update the rrd.

2) Create a new data source in Cacti pointing to the rrd created in the first step.

3) Create a new graph in Cacti using the data source create above.

Hope this answers your question.

- V.
Back to top
Guest






PostPosted: Mon Aug 25, 2003 7:41 am    Post subject: Question? Reply with quote

Hello Justin,

Would it be possible for you to post that perl script for the cmts's?

thanks in advance
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group