Page 2 of 9
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Fri Aug 01, 2014 12:27 pm
by sreinhardt
Can you list the contents of /tmp. I am wondering if you have a wmi plus temp file locked in place that keeps the delta at 100% opposed to varying like it should. Just an additional note, this would almost definitely account for the user and execute differences and why it works in some cases and not others, since it will likely have a different temp file per way of calling.
Code: Select all
ls -lart /tmp | grep "\.state"
grep -R '100' /tmp/*.state
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Mon Aug 04, 2014 1:52 am
by Frédéric GRANAT
[root@nagiosxi ~]# ls -lart /tmp | grep "\.state"
-rw-r--r-- 1 apache apache 194 Apr 10 15:50 cwpss_checkcpu_192168116___.state
-rw-rw-r-- 1 nagios nagios 191 May 19 11:06 cwpss_checkcpu_1721656___.state
-rw-rw-r-- 1 nagios nagios 197 Jun 24 19:56 cwpss_checkcpu_17216105245___.state
-rw-rw-r-- 1 nagios nagios 197 Jul 17 12:31 cwpss_checkcpu_1921681054___.state
-rw-rw-r-- 1 nagios nagios 197 Jul 17 12:31 cwpss_checkcpu_1921681055___.state
-rw-rw-r-- 1 nagios nagios 196 Jul 21 12:37 cwpss_checkcpu_17216117___.state
-rw-rw-r-- 1 nagios nagios 192 Jul 24 12:11 cwpss_checkcpu_19216815___.state
-rw-r--r-- 1 root root 194 Jul 25 09:23 cwpss_checkcpu_WSAPP29WEB___.state
-rw-rw-r-- 1 nagios nagios 195 Jul 31 09:12 cwpss_checkcpu_172161015___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 1 12:07 cwpss_checkcpu_172161048___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 2 18:21 cwpss_checkcpu_172161011___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:47 cwpss_checkcpu_1721669___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:50 cwpss_checkcpu_17216113___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:50 cwpss_checkcpu_17216101___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:50 cwpss_checkcpu_17216112___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216119___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_192168117___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_1721691___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:51 cwpss_checkcpu_1721649___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_1721624___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_17216106___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:51 cwpss_checkcpu_1721654___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_1721693___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_1721689___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_1721687___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721683___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721679___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721671___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:51 cwpss_checkcpu_1721664___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:51 cwpss_checkcpu_1721658___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721653___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:51 cwpss_checkcpu_17216513___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:51 cwpss_checkcpu_1721639___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:51 cwpss_checkcpu_1721636___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216210___.state
-rw-rw-r-- 1 nagios nagios 190 Aug 4 08:51 cwpss_checkcpu_1721619___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_1721611___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216118___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216115___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:51 cwpss_checkcpu_1721610441___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_19216819___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721698___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:51 cwpss_checkcpu_1721694___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_1721685___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_1721681___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_17216815___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_1721677___.state
-rw-rw-r-- 1 nagios nagios 198 Aug 4 08:51 cwpss_checkcpu_1721666___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216611___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:51 cwpss_checkcpu_1721655___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:51 cwpss_checkcpu_17216515___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:51 cwpss_checkcpu_1721643___.state
-rw-rw-r-- 1 nagios nagios 190 Aug 4 08:51 cwpss_checkcpu_1721634___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_17216315___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:51 cwpss_checkcpu_17216311___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:51 cwpss_checkcpu_17216310___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_1721625___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_17216213___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216121___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216116___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216114___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216103___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_17216101192___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_19216817___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721699___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721697___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_17216913___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216912___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_1721688___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_1721684___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_1721682___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_1721678___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_1721676___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721672___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216715___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216712___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:51 cwpss_checkcpu_1721638___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_1721629___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_17216212___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_1721615___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216111___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_172161110___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216105___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_1721695___.state
-rw-rw-r-- 1 nagios nagios 198 Aug 4 08:51 cwpss_checkcpu_1721668___.state
-rw-rw-r-- 1 nagios nagios 191 Aug 4 08:51 cwpss_checkcpu_1721659___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_172161010___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216911___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216910___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_1721686___.state
-rw-rw-r-- 1 nagios nagios 191 Aug 4 08:51 cwpss_checkcpu_17216714___.state
-rw-rw-r-- 1 nagios nagios 191 Aug 4 08:51 cwpss_checkcpu_17216711___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_17216710___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216613___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216610___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_1721618___.state
-rw-rw-r-- 1 nagios nagios 191 Aug 4 08:51 cwpss_checkcpu_1721612___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:51 cwpss_checkcpu_17216109___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_17216104___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:51 cwpss_checkcpu_17216104179___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_17216104119___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:51 cwpss_checkcpu_17216101199___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_1721674___.state
-rw-rw-r-- 1 nagios nagios 191 Aug 4 08:51 cwpss_checkcpu_1721627___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:51 cwpss_checkcpu_10302___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:52 cwpss_checkcpu_192168642___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:52 cwpss_checkcpu_192168632___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:52 cwpss_checkcpu_192168622___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:52 cwpss_checkcpu_192168517___.state
-rw-rw-r-- 1 nagios nagios 190 Aug 4 08:52 cwpss_checkcpu_192168515___.state
-rw-rw-r-- 1 nagios nagios 196 Aug 4 08:52 cwpss_checkcpu_19216851136___.state
-rw-rw-r-- 1 nagios nagios 197 Aug 4 08:52 cwpss_checkcpu_192168502___.state
-rw-rw-r-- 1 nagios nagios 192 Aug 4 08:52 cwpss_checkcpu_19216845116___.state
-rw-rw-r-- 1 nagios nagios 194 Aug 4 08:52 cwpss_checkcpu_19216830173___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:52 cwpss_checkcpu_192168612___.state
-rw-rw-r-- 1 nagios nagios 188 Aug 4 08:52 cwpss_checkcpu_192168602___.state
-rw-rw-r-- 1 nagios nagios 195 Aug 4 08:52 cwpss_checkcpu_192168516___.state
-rw-rw-r-- 1 nagios nagios 190 Aug 4 08:52 cwpss_checkcpu_19216845134___.state
-rw-rw-r-- 1 nagios nagios 198 Aug 4 08:52 cwpss_checkcpu_19216845122___.state
[root@nagiosxi ~]# grep -R '100' /tmp/*.state
Binary file /tmp/cwpss_checkcpu_10302___.state matches
Binary file /tmp/cwpss_checkcpu_172161010___.state matches
Binary file /tmp/cwpss_checkcpu_17216101192___.state matches
Binary file /tmp/cwpss_checkcpu_17216101199___.state matches
Binary file /tmp/cwpss_checkcpu_172161011___.state matches
Binary file /tmp/cwpss_checkcpu_172161015___.state matches
Binary file /tmp/cwpss_checkcpu_17216101___.state matches
Binary file /tmp/cwpss_checkcpu_17216103___.state matches
Binary file /tmp/cwpss_checkcpu_17216104119___.state matches
Binary file /tmp/cwpss_checkcpu_17216104179___.state matches
Binary file /tmp/cwpss_checkcpu_1721610441___.state matches
Binary file /tmp/cwpss_checkcpu_172161048___.state matches
Binary file /tmp/cwpss_checkcpu_17216104___.state matches
Binary file /tmp/cwpss_checkcpu_17216105245___.state matches
Binary file /tmp/cwpss_checkcpu_17216105___.state matches
Binary file /tmp/cwpss_checkcpu_17216106___.state matches
Binary file /tmp/cwpss_checkcpu_17216109___.state matches
Binary file /tmp/cwpss_checkcpu_172161110___.state matches
Binary file /tmp/cwpss_checkcpu_17216111___.state matches
Binary file /tmp/cwpss_checkcpu_17216112___.state matches
Binary file /tmp/cwpss_checkcpu_17216113___.state matches
Binary file /tmp/cwpss_checkcpu_17216114___.state matches
Binary file /tmp/cwpss_checkcpu_17216115___.state matches
Binary file /tmp/cwpss_checkcpu_17216116___.state matches
Binary file /tmp/cwpss_checkcpu_17216117___.state matches
Binary file /tmp/cwpss_checkcpu_17216118___.state matches
Binary file /tmp/cwpss_checkcpu_17216119___.state matches
Binary file /tmp/cwpss_checkcpu_1721611___.state matches
Binary file /tmp/cwpss_checkcpu_17216121___.state matches
Binary file /tmp/cwpss_checkcpu_1721612___.state matches
Binary file /tmp/cwpss_checkcpu_1721615___.state matches
Binary file /tmp/cwpss_checkcpu_1721618___.state matches
Binary file /tmp/cwpss_checkcpu_1721619___.state matches
Binary file /tmp/cwpss_checkcpu_17216210___.state matches
Binary file /tmp/cwpss_checkcpu_17216212___.state matches
Binary file /tmp/cwpss_checkcpu_17216213___.state matches
Binary file /tmp/cwpss_checkcpu_1721624___.state matches
Binary file /tmp/cwpss_checkcpu_1721625___.state matches
Binary file /tmp/cwpss_checkcpu_1721627___.state matches
Binary file /tmp/cwpss_checkcpu_1721629___.state matches
Binary file /tmp/cwpss_checkcpu_17216310___.state matches
Binary file /tmp/cwpss_checkcpu_17216311___.state matches
Binary file /tmp/cwpss_checkcpu_17216315___.state matches
Binary file /tmp/cwpss_checkcpu_1721634___.state matches
Binary file /tmp/cwpss_checkcpu_1721636___.state matches
Binary file /tmp/cwpss_checkcpu_1721638___.state matches
Binary file /tmp/cwpss_checkcpu_1721639___.state matches
Binary file /tmp/cwpss_checkcpu_1721643___.state matches
Binary file /tmp/cwpss_checkcpu_1721649___.state matches
Binary file /tmp/cwpss_checkcpu_17216513___.state matches
Binary file /tmp/cwpss_checkcpu_17216515___.state matches
Binary file /tmp/cwpss_checkcpu_1721653___.state matches
Binary file /tmp/cwpss_checkcpu_1721654___.state matches
Binary file /tmp/cwpss_checkcpu_1721655___.state matches
Binary file /tmp/cwpss_checkcpu_1721656___.state matches
Binary file /tmp/cwpss_checkcpu_1721658___.state matches
Binary file /tmp/cwpss_checkcpu_1721659___.state matches
Binary file /tmp/cwpss_checkcpu_17216610___.state matches
Binary file /tmp/cwpss_checkcpu_17216611___.state matches
Binary file /tmp/cwpss_checkcpu_17216613___.state matches
Binary file /tmp/cwpss_checkcpu_1721664___.state matches
Binary file /tmp/cwpss_checkcpu_1721666___.state matches
Binary file /tmp/cwpss_checkcpu_1721668___.state matches
Binary file /tmp/cwpss_checkcpu_1721669___.state matches
Binary file /tmp/cwpss_checkcpu_17216710___.state matches
Binary file /tmp/cwpss_checkcpu_17216711___.state matches
Binary file /tmp/cwpss_checkcpu_17216712___.state matches
Binary file /tmp/cwpss_checkcpu_17216714___.state matches
Binary file /tmp/cwpss_checkcpu_17216715___.state matches
Binary file /tmp/cwpss_checkcpu_1721671___.state matches
Binary file /tmp/cwpss_checkcpu_1721672___.state matches
Binary file /tmp/cwpss_checkcpu_1721674___.state matches
Binary file /tmp/cwpss_checkcpu_1721676___.state matches
Binary file /tmp/cwpss_checkcpu_1721677___.state matches
Binary file /tmp/cwpss_checkcpu_1721678___.state matches
Binary file /tmp/cwpss_checkcpu_1721679___.state matches
Binary file /tmp/cwpss_checkcpu_17216815___.state matches
Binary file /tmp/cwpss_checkcpu_1721681___.state matches
Binary file /tmp/cwpss_checkcpu_1721682___.state matches
Binary file /tmp/cwpss_checkcpu_1721683___.state matches
Binary file /tmp/cwpss_checkcpu_1721684___.state matches
Binary file /tmp/cwpss_checkcpu_1721685___.state matches
Binary file /tmp/cwpss_checkcpu_1721686___.state matches
Binary file /tmp/cwpss_checkcpu_1721687___.state matches
Binary file /tmp/cwpss_checkcpu_1721688___.state matches
Binary file /tmp/cwpss_checkcpu_1721689___.state matches
Binary file /tmp/cwpss_checkcpu_17216910___.state matches
Binary file /tmp/cwpss_checkcpu_17216911___.state matches
Binary file /tmp/cwpss_checkcpu_17216912___.state matches
Binary file /tmp/cwpss_checkcpu_17216913___.state matches
Binary file /tmp/cwpss_checkcpu_1721691___.state matches
Binary file /tmp/cwpss_checkcpu_1721693___.state matches
Binary file /tmp/cwpss_checkcpu_1721694___.state matches
Binary file /tmp/cwpss_checkcpu_1721695___.state matches
Binary file /tmp/cwpss_checkcpu_1721697___.state matches
Binary file /tmp/cwpss_checkcpu_1721698___.state matches
Binary file /tmp/cwpss_checkcpu_1721699___.state matches
Binary file /tmp/cwpss_checkcpu_1921681054___.state matches
Binary file /tmp/cwpss_checkcpu_1921681055___.state matches
Binary file /tmp/cwpss_checkcpu_192168116___.state matches
Binary file /tmp/cwpss_checkcpu_192168117___.state matches
Binary file /tmp/cwpss_checkcpu_19216815___.state matches
Binary file /tmp/cwpss_checkcpu_19216817___.state matches
Binary file /tmp/cwpss_checkcpu_19216819___.state matches
Binary file /tmp/cwpss_checkcpu_19216830173___.state matches
Binary file /tmp/cwpss_checkcpu_19216845116___.state matches
Binary file /tmp/cwpss_checkcpu_19216845122___.state matches
Binary file /tmp/cwpss_checkcpu_19216845134___.state matches
Binary file /tmp/cwpss_checkcpu_192168502___.state matches
Binary file /tmp/cwpss_checkcpu_19216851136___.state matches
Binary file /tmp/cwpss_checkcpu_192168515___.state matches
Binary file /tmp/cwpss_checkcpu_192168516___.state matches
Binary file /tmp/cwpss_checkcpu_192168517___.state matches
Binary file /tmp/cwpss_checkcpu_192168602___.state matches
Binary file /tmp/cwpss_checkcpu_192168612___.state matches
Binary file /tmp/cwpss_checkcpu_192168622___.state matches
Binary file /tmp/cwpss_checkcpu_192168632___.state matches
Binary file /tmp/cwpss_checkcpu_192168642___.state matches
Binary file /tmp/cwpss_checkcpu_WSAPP29WEB___.state matches
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Mon Aug 04, 2014 11:39 am
by lmiltchev
define service {
host_name server
service_description CPU Usage
use windows-cpu
servicegroups Serveurs applications metiers
register 1
}
I don't see a check command defined here. Is it defined in the "windows-cpu" template? Can you show the "windows-cpu" definition?
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Tue Aug 05, 2014 2:07 am
by Frédéric GRANAT
define service {
name windows-cpu
use windows
check_command check_win_cpu!account!password!80!90!!!!
register 0
}
Definition of check_win_cpu :
$USER1$/check_wmi_plus.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -m checkcpu -w $ARG3$ -c $ARG4$ $ARG5$
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Tue Aug 05, 2014 2:48 pm
by lmiltchev
I didn't see any issues with the configs. What are the permissions of the /tmp directory?
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Wed Aug 06, 2014 2:09 am
by Frédéric GRANAT
[root@nagiosxi etc]# ll -d /tmp
drwxrwxrwt 17 root root 40960 Aug 6 09:08 /tmp
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Wed Aug 06, 2014 4:25 pm
by lmiltchev
The permissions on the /tmp are fine, too. You are not making this easy, are you?

Do you see different output when you run the check in the CLI as nagios user? Run the following commands and show us the output:
Code: Select all
/usr/local/nagios/libexec/check_wmi_plus.pl -H server1 -u user -p pwd -m checkcpu -w 80 -c 90
su -l nagios -c '/usr/local/nagios/libexec/check_wmi_plus.pl -H server1 -u user -p pwd -m checkcpu -w 80 -c 90'
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Thu Aug 07, 2014 2:13 am
by Frédéric GRANAT
[root@nagiosxi nagiosxi]# /usr/local/nagios/libexec/check_wmi_plus.pl -H server -u user -p pwd -m checkcpu -w 80 -c 90
OK (Sample Period 9 sec) - Average CPU Utilisation 0.44%|'Avg CPU Utilisation'=0.44%;80;90;
[root@nagiosxi nagiosxi]# su -l nagios -c '/usr/local/nagios/libexec/check_wmi_plus.pl -H server -u user -p pwd -m checkcpu -w 80 -c 90'
su: warning: cannot change directory to /home/nagios: Permission denied
-bash: /home/nagios/.bash_profile: Permission denied
UNKNOWN - Permission denied when trying to store the state data. Sometimes this happens if you have been testing the plugin from the command line as a different user to the Nagio process user. You will need to change the permissions on the file or remove it. The actual error text is: can't create /tmp/cwpss_checkcpu_wsapp29web___.state: Permission denied at /usr/local/nagios/libexec/check_wmi_plus.pl line 1740
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Thu Aug 07, 2014 10:54 am
by lmiltchev
Run the following commands and show the output:
Code: Select all
ls -lad /home/nagios
ls -la /home/nagios
cat /home/nagios/.bash_profile
Re: Problem with monitoring Windows 2012 R2 servers
Posted: Fri Aug 08, 2014 2:01 am
by Frédéric GRANAT
[root@nagiosxi nagiosxi]# ls -lad /home/nagios
drwx------ 2 500 users 4096 Apr 22 2013 /home/nagios
[root@nagiosxi nagiosxi]# ls -la /home/nagios
total 76
drwx------ 2 500 users 4096 Apr 22 2013 .
drwxr-xr-x 6 root root 4096 Oct 20 2011 ..
-rw------- 1 500 users 1248 Oct 7 2011 .bash_history
-rw-r--r-- 1 500 users 33 Jan 11 2010 .bash_logout
-rw-r--r-- 1 500 users 176 Jan 11 2010 .bash_profile
-rw-r--r-- 1 500 users 124 Jan 11 2010 .bashrc
-rw-r--r-- 1 500 users 216 Mar 1 2013 cookie.txt
-rw-r--r-- 1 500 users 5012 Mar 14 2013 dead.letter
-rw------- 1 500 users 13668 Oct 7 2011 .viminfo
[root@nagiosxi nagiosxi]# cat /home/nagios/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH