Hello,
i'm trying to create a graph from this perl output: print "Isjungti:$Total Isviso:$Total4 Neisjunge1:$Total0 Neisjunge2:$Total1 Neisjunge3:$Total2";
prints out this: Isjungti:371 Isviso:372 Neisjunge1:14 Neisjunge2:21 Neisjunge3:15
i was following http://docs.cacti.net/manual:087:3a_adv ... ut_methods guide but something went wrong.. Problem is that i'm missing something and i cant find what.. any help would be appreciated. I think the problem is in data input or data source any suggestions?
EDIT:
Found my problem.. its in perl output..
05/10/2011 08:40:02 AM - SPINE: Poller[0] Host[0] DS[659] SCRIPT: /usr/bin/perl /usr/share/cacti/site/scripts/stat.pl, output: Isjungti:0 Isviso: Neisjunge1: Neisjunge2: Neisjunge3:
if i print "Isjungti:371 Isviso:372 Neisjunge1:14 Neisjunge2:21 Neisjunge3:15" from perl script it works... ;\ any suggestions on perl output format?
Need help with Data Input/Data source
Moderators: Developers, Moderators
Re: Need help with Data Input/Data source
It seems to be failed getting values except Isjungti.Lasas wrote:05/10/2011 08:40:02 AM - SPINE: Poller[0] Host[0] DS[659] SCRIPT: /usr/bin/perl /usr/share/cacti/site/scripts/stat.pl, output: Isjungti:0 Isviso: Neisjunge1: Neisjunge2: Neisjunge3:
Did you see such a line "WARNING: Result from SCRIPT not valid. Partial Result:..." in Cacti log?
If you use spine, check this:
http://docs.cacti.net/manual:087:3a_advanced_topics.1_data_input_methods#making_your_scripts_work_with_cacti
Note: Spine requires, that multiple parameters are spit out by a single “print” statement. ...
Re: Need help with Data Input/Data source
I tried whit separate print for each value then in one line then separate with new line still no luck...
when i print values (print "Isjungti:$Total "; so on...) i get
05/10/2011 11:55:03 AM - SPINE: Poller[0] Host[0] DS[660] SCRIPT: /usr/share/cacti/site/scripts/stat.pl, output: U
i was able to get it working only when i print "Isjungti:371 Isviso:372 Neisjunge1:25 Neisjunge2:1 Neisjunge3:1"
numbers are written by me in perl script...
no warnings in log and that value of "isjungt" it should't be 0.. it should be 371
when i print values (print "Isjungti:$Total "; so on...) i get
05/10/2011 11:55:03 AM - SPINE: Poller[0] Host[0] DS[660] SCRIPT: /usr/share/cacti/site/scripts/stat.pl, output: U
i was able to get it working only when i print "Isjungti:371 Isviso:372 Neisjunge1:25 Neisjunge2:1 Neisjunge3:1"
numbers are written by me in perl script...
no warnings in log and that value of "isjungt" it should't be 0.. it should be 371
Re: Need help with Data Input/Data source
Oh sorry, you did already with single print statement.
If you are using external command from perl script (like system(), backquote, etc.),
try to specify them with full pathname.
Then, how do you retrieve each values ($Total, $Total0, $Total1, ...) ?Lasas wrote:i'm trying to create a graph from this perl output: print "Isjungti:$Total Isviso:$Total4 Neisjunge1:$Total0 Neisjunge2:$Total1 Neisjunge3:$Total2";
If you are using external command from perl script (like system(), backquote, etc.),
try to specify them with full pathname.
Re: Need help with Data Input/Data source
well stupid me found whats the problem... txt files with info was in /root/ dir.. moved them to /usr/share/cacti/site/scripts/ problem solved.. THX for helping
Who is online
Users browsing this forum: No registered users and 3 guests