Hi. I hope somebody can help in this problem.
I have a perl script, very simple one, just do a snmpget and parse the result to get each binary digit.
$mib="x.x.x.x.x.x.x";
$host=$ARGV[0];
open(COMANDO, "/usr/bin/snmpget -v2c -c public $host $mib | ");
$salida = <COMANDO>;
close(COMANDO);
# la siguiente linea extrae el valor despues del igual
if ($salida =~ /.*.INTEGER:(.*)/) {
$lectura=$1;
}
$div=$lectura;
for ($i=0; $i<=13; $i++) {
$valor_di[$i]=$div % 2;
print "di$i:$valor_di[$i] ";
$div=$div / 2;
}
print "\n";
The result of the execution of this script is something like:
di0:1 di1:0 di2:0 di3:0 di4:0 di5:1 di6:1 di7:0 di8:0 di9:1 di10:1 di11:0 di12:0 di13:0
Two strange things are happening:
1) in the log i get the message
02/12/2020 05:30:02 PM - SPINE: Poller[0] Host[57] ERROR: Empty result [172.26.25.230]: '/usr/bin/perl /usr/share/cacti/site/scripts/Di.pl 172.26.25.230'
This happens, not every time poller is run, but very frequently
2) di values are graphed normally, except for di0. This particulary one oscillates between 2 posible values (0 and 1). Should be always 1 and i found no reason for that.
To analize this problem i graphed the rough value obtained with snmp polling and value is graphed ok
The rest of di values also graph ok.
All the values are from the same device and script executed manually with www-data user executes ok:
sudo -u www-data /usr/bin/perl /usr/share/cacti/site/scripts/Di.pl <device ip>
di0:1 di1:0 di2:0 di3:0 di4:0 di5:1 di6:1 di7:0 di8:0 di9:1 di10:1 di11:0 di12:0 di13:0
As shown i am using absolute paths por calling perl from cacti, and inside perl script to execute snmpget. As most of the graphs are working ok, it doesnt seem to be a problem with device, or with script permisions, but i am not sure.
So any help is very welcome of what to see or what to do.
Poller[0] Host[xx] ERROR: Empty result
Moderators: Developers, Moderators
Re: Poller[0] Host[xx] ERROR: Empty result
Just to help anybody i had to use poller.php. Apparently there is a bug with spine or something. Nothing else worked
- TheWitness
- Developer
- Posts: 17061
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: Poller[0] Host[xx] ERROR: Empty result
Wrong. Its well documented you have to print everything at once. You were printing in parts which is not supported in spine for performance reasons.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: Poller[0] Host[xx] ERROR: Empty result
Didnt know about that. Is it advisable to modify all scripts to do that even with cmd.php for performance reasons?. I am willing to do that without major problems if that is important
Who is online
Users browsing this forum: No registered users and 3 guests