Data query from loca file

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

Moderators: Developers, Moderators

Post Reply
admo
Posts: 4
Joined: Fri Jan 13, 2006 9:07 am

Data query from loca file

Post by admo »

Hi,
I want to make data query simile as http://www.roth.lu/cacti-snmp-tut.htm
but not via snmp but from a local file.

Thanks
Adam
admo
Posts: 4
Joined: Fri Jan 13, 2006 9:07 am

Post by admo »

I don't get data from script but from file so I can't run it but only show
admo
Posts: 4
Joined: Fri Jan 13, 2006 9:07 am

Post by admo »

:)
May I use
cat /var/log/statistiche/82.112.210.80
instead of
perl /cacti_path/scripts/script.pl <host_ip>
to put data in Input String (Data Input Methods) ?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please try the second to last link of my signature as a start. It's not that complex than the one you referred to
Reinhard
jmadrid2
Posts: 43
Joined: Thu May 04, 2006 9:32 am
Location: Bayonne, NJ

Post by jmadrid2 »

There is an even easier way. I would just create a small shell script that does the command you want/need.
For instance:
#!/bin/sh
cat /var/log/statistiche/82.112.210.80

I have a similar script that works perfectly fine the same way. Its slighty more complex as there are multiple variables. When creating your Data Input Method just put

/opt/cacti/scripts/yourscript.sh

And you should be good to go.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests