The attached svn diff file contains patches I made to my Cacti 0.8.7g install that add a new Data Input Type: Read File.
The actual code calls the PHP function file_get_contents() which can read a local file or any other URL such as a HTTP or HTTPS request.
Now you can create periodic processes on your remote systems that output standard Cacti name:value pair based data values into a simple text file and then make it web accessible. Using this Data Input Type you can now grab that data in one simple HTTP read. Or of course you could make a request to a PHP or any other dynamic language script which does some calculations and returns back the results directly.
This type of data input is very flexible and can solve a lot of problems where SNMP can't be used.
The code takes the first and only Input field defined for the Data Input Method as the path/URL to read.
New Data Input Type - Read File/URL
Moderators: Developers, Moderators
-
- Posts: 10
- Joined: Sat Apr 30, 2005 2:40 pm
New Data Input Type - Read File/URL
- Attachments
-
- readfile_datainput-svndiff.txt
- svn diff against Cacti 0.8.7g to add a Read File Data Input Type
- (8.99 KiB) Downloaded 419 times
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Re: New Data Input Type - Read File/URL
This will not work if you are using the Spine data collector for Cacti.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Who is online
Users browsing this forum: No registered users and 0 guests