[solved] Graphing non SNMP data

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
fgiugliano
Posts: 6
Joined: Wed May 30, 2012 7:07 pm

[solved] Graphing non SNMP data

Post by fgiugliano »

I've been using cacti for almost 2 years now and I absolutely love it. My set up graphs our windows and linux servers using both SNMP as well as WMI for the windows boxes. I've been able to do it all just by searching until now.

I found this really interesting article:

http://penguinman-techtalk.blogspot.com ... thout.html

And this absolutely blew my mind with the new possibilities this would allow me to graph, but my graphs are blank. There's no errors in the graph debug and no errors in the data debug and I'm not sure how to troubleshoot this issue. I've been messing around all day with this and I've finally given up.

It uses a command for data input method: wget --quiet --no-cache -O - http://<hostname>:<data_port>/myapp/statistics
this page is simple as it just textfield:textvalue textfield2:text2value textfield3:text3value etc...

The only difference I see is this guy is doing this with version 0.8.7d and I'm using version 0.8.7g. Is there anyone out there who's willing to take a crack at this and see what I'm doing wrong here?
I appreciate all your time and hard work.
Mattie112
Posts: 3
Joined: Wed May 30, 2012 9:17 am

Re: Graphing non SNMP data

Post by Mattie112 »

Tis can be usefull: make sure it's PLAIN TEXT not unicode. I had a simulair issue and converting it from unicote to ascii solved my problem
fgiugliano
Posts: 6
Joined: Wed May 30, 2012 7:07 pm

Re: Graphing non SNMP data

Post by fgiugliano »

Thank you!

You were exactly right. It wasn't getting the data from my php page. So I just took my php page and dumped the results into a text and changed my input string to

Code: Select all

php /var/www/filelocation/file.php && wget --quiet --no-cache -O - http://127.0.0.1/filelocation/file.txt
Thanks Again!!
Mattie112
Posts: 3
Joined: Wed May 30, 2012 9:17 am

Re: [solved] Graphing non SNMP data

Post by Mattie112 »

No problem, that's the way i'm doing it :p
fgiugliano
Posts: 6
Joined: Wed May 30, 2012 7:07 pm

Re: [solved] Graphing non SNMP data

Post by fgiugliano »

This wasn't creating the txt properly

Code: Select all

php /var/www/filelocation/file.php && wget --quiet --no-cache -O - http://127.0.0.1/filelocation/file.txt
So I switched went with curl instead

Code: Select all

curl http://127.0.0.1/filelocation/file.php && wget --quiet --no-cache -O - http://127.0.0.1/filelocation/file.txt
All is well and 100% working for sure.

Edit**

Just in case anyone was wondering here's the php file:

Code: Select all

<?php
$file='textf.txt';
$content = strip_tags(file_get_contents('http://someplace.com/filethatlistsyourvariables.php'));
file_put_contents($file, $content);
?>
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests