I am in need of help getting data from a script I wrote into Cacti to be graphed. I am having trouble with the concept I think. I see lots of scripts were the output is always predictable and the XML files and queries reflect that. My question is, that if I had the following input:
./redback_sub_totals.pl -i <redback IP/hostname> -u <login name> -p <login password> -c <context1>,<context2>,<context3>,<context...>
And the following output:
adsl:4340 idsl:301 iframe:18, or
bbg:238 dslam:5324, or
idsl:1324 adsl:234 dslam:123 iframe:1234, etc..
What would I do for the "Data Input Method", XML file, and Data Query?
Do I have to create a "Data Input Method" for every host, based on the number of "contexts" I am retrieving data from, or is there a way to make it modular so that I can just create one "Data Input Method", XML file, etc. And use that for all the hosts - passing the correct options on a per host bases?
If anyone can answer that question, I would also like to see how the XML file would look for such a job. Thank you for any help you can give.
-chadd.
Help getting script data into Cacti
Moderators: Developers, Moderators
Thank you very much for your quick reply! I just have one more question though, and maybe it is that I am missing something, but my script output could change. In your example you have nb_connect_total and nb_connect_host. In my script, I will have any number of <contexts>:<total>. So, if I am reading this right, I would have to create a data input method for every redback and change the data input method every time I need to add or remove a context from that redback? Please help me understand. Thanks for help, and sorry for the confusion. Oh, one more thing.. I didn't see an XML file in your tutorial.. Do you need one? Thanks again,
-chadd.
-chadd.
If i'm right...
Metos
- with data input method u can only have output like that: (u don't need wml file)
data1:<value> data2:<value>
- i'm writting a new tutorial to use data query with xml file, it is to have output like that: (it is quite like for the filesystem)
<context>:<value1>:<value2>:<value.....
filespace130000
filespace340000
.....
event in that case all the description are stored in an xml file, so all (using ur word) the contexty should exist in that file, i'm not sure but u can't have dynamics variables.
Metos
Metos,
I have figured out how to make it work with the script/command. It is pretty ugly (have to create a data input method, data template, and graph template for every device), but it works. I will post the scripts to the forum, in case anyone else still has SMS 1800s in there network . Thanks for the help, and those tutorials may be a great help in the future to others (and me . Just adding an XML file for each host is a lot cleaner than all the stuff I had to add..
-chadd.
I have figured out how to make it work with the script/command. It is pretty ugly (have to create a data input method, data template, and graph template for every device), but it works. I will post the scripts to the forum, in case anyone else still has SMS 1800s in there network . Thanks for the help, and those tutorials may be a great help in the future to others (and me . Just adding an XML file for each host is a lot cleaner than all the stuff I had to add..
-chadd.
Who is online
Users browsing this forum: No registered users and 1 guest