I am using the Nagios Check_nt client to remotely check Win2k servers. I am using the following script to get memory usage %:
#!/usr/bin/perl
$response = `/usr/local/cacti/scripts/check_nt -H $ARGV[0] -p 1248 -v MEMUSE`;
chomp $response;
($used) = ($response =~ /used: \d+.\d+ Mb \((\d+)\%\) /);
print "$used\n";
This script works fine from the command line but when I run cmd.php the output: is always blank. It has to have something to do with this line:
($used) = ($response =~ /used: \d+.\d+ Mb \((\d+)\%\) /);
which strips the response. Why would this line cause Cacti to not see the response at all?? Any help would be greatly appreciated. Using Solaris 9.
-stiletto
Help w/Solaris script.
Moderators: Developers, Moderators
Thanks for the message.
# ldd check_nt
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libresolv.so.2 => /usr/lib/libresolv.so.2
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
I'm not totally familiar with Solaris...so how do I check the "ldd" of cron and set them to this?
-stiletto
# ldd check_nt
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libresolv.so.2 => /usr/lib/libresolv.so.2
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Blade-1000/lib/libc_psr.so.1
I'm not totally familiar with Solaris...so how do I check the "ldd" of cron and set them to this?
-stiletto
Who is online
Users browsing this forum: No registered users and 1 guest