felimwhiteley / libsrvrmgrd-osx

Automatically exported from code.google.com/p/libsrvrmgrd-osx
5 stars 2 forks source link

No warning on hddUsage or cpuUsage #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./check_osx_server hddUsage HostName 311 User Pass 1 2
2. ./check_osx_server cpuUsage HostName 311 User Pass 1 2

What is the expected output?
CRITICAL/WARNING

What do you see instead?
hddUsage:['OS RAID':10% 'XRAID2':84% 'XRAID':94%]
cpuUsage:2%

What version of the product are you using?
0.6.2
On what operating system?
RHEL6
Are you using the ini config file?
No.

Original issue reported on code.google.com by roywperk...@gmail.com on 1 Sep 2011 at 3:45

GoogleCodeExporter commented 9 years ago
Just a quick check (perhaps you knwo this already), when you run the command, 
immediately after the output text run

echo $?

This will give the exit status which controls Nagios warning/critical status, 
0=OK, 1=WARNING and 2=CRITICAL. The plugin doesn't modify the output text. This 
was in case it was being parsed by something else. I could add it if you want.

Original comment by felimwhiteley on 1 Sep 2011 at 4:04

GoogleCodeExporter commented 9 years ago
Okay, I can get a 0 status if I don't put numbers for warning and critical, but 
I don't get anything if I do.  Also, on the hard disk check, it reports 0 when 
the XRAID is at 94% full.

/usr/local/nagios/libexec/check_osx_server cpuUsage hostname 311 user pass 1 2 
&& echo $?
cpuUsage:9% 

/usr/local/nagios/libexec/check_osx_server cpuUsage hostname 311 user pass && 
echo $?
cpuUsage:9% 
0

/usr/local/nagios/libexec/check_osx_server hddUsage hostname 311 user pass && 
echo $?
hddUsage:['OS RAID':11% 'XRAID2':85% 'XRAID':94%] 
0

Original comment by roywperk...@gmail.com on 1 Sep 2011 at 4:57

GoogleCodeExporter commented 9 years ago
You are right. I'd left out the defaults here becasue I had intially intended 
on having non percentage based chacks for HDDs too. I must have been side 
tracked in process back in the dim and distant path. Adjusted it so it is in 
fact a 80% warning and 90% critical alert. I'm going to push this as a new 
version asap, any chance you can test it to make sure it works for you as 
expected? By any chance have you access to an XSan? I'm looking to test on one 
as well from issue 11, but no response. I'd like this to be tested before 
making 0.6.3 live.

Thanks for your help!

Original comment by felimwhiteley on 2 Sep 2011 at 2:33

GoogleCodeExporter commented 9 years ago
Attach the file and I will test it.  I don't have an XSan.  We just have an 
Intel Xserve with a direct Fibre attached old school XRAID.

Thanks,
Roy

Original comment by roywperk...@gmail.com on 2 Sep 2011 at 3:33

GoogleCodeExporter commented 9 years ago
Ah you can grab it here:

http://libsrvrmgrd-osx.googlecode.com/svn/trunk/check_osx_server

Original comment by felimwhiteley on 5 Sep 2011 at 7:12

GoogleCodeExporter commented 9 years ago
I just tried it out and it seems to work correctly.  It immediately generated 
an email about the disk being over 90% full.

Thanks,
Roy

Original comment by roywperk...@gmail.com on 6 Sep 2011 at 1:40

GoogleCodeExporter commented 9 years ago

Original comment by felimwhiteley on 4 Nov 2011 at 2:36