Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
#!/usr/bin/perl
$output = `ssh mail "find /var/CommuniGate/Queue -type f -name *.msg | wc -l"`;
printf ("emails:%u",$output);
This script was working for a long time, but now I've transferred Cacti on another server, and when I run this script from command line - it shows email count correctly, but when Cacti's poller runs it - it's always:
Of course ssh credentials are set up correctly. If I run script from shell - it'll return correct number, but it seems that cacti just doesn't understand format and always shows zero. No errors are in log, just zero in output.