That was the problem. Cmk –d results showed that the appropriate name is “JacadaService”. I put that into the check config and now the service is “OK”.
Thank you very much for your help.
···
Am 23.07.2013 18:11 schrieb “Wesley Merrill” wmerrill@uga.edu:
I am not executing the batch file as the same user as the agent. The agent is using the system account,
and I am logged on as a local administrator. After a little searching I found that I probably could start a command prompt as the system account using psexec, but the pstools are not on these servers and they are in production so I cannot install new software
on them without approval.
Regarding the builtin feature, I have no reason other than my own ignorance to explain why I have
not used it. I think that I was looking for a way to monitor services and came upon the documentation for doing local checks first. Thanks for pointing me in a better direction.
I have read more of the documentation for checking Windows services and tried to implement it. I
added the following to my check_mk config.
checks += [
( ["server01","server02"], "services", "Jacada Server”, {} ),
]
Unfortunately, this has not worked as I expected either. Nagios and Check_MK are reporting that the
state of the “service Jacada Server” is unknown, and the status detail says “UNKNOWN – service not found”.
Have I implemented the service check incorrectly?
Thanks for your help.
wes
From: Marcel Schulte [mailto:schulte.marcel@gmail.com]
Sent: Tuesday, July 23, 2013 10:45 AM
To: Wesley Merrill
Cc: checkmk-en@lists.mathias-kettner.de
Subject: Re: [Check_mk (english)] Problem with local check on Windows Server 2003
Hi Wes,
Missed that you can execute locally, sorry.
Do you execute as the same user the agent runs as? Sometimes such phenomenons occurre because of missing rights…
The question regarding builtin feature remains.
Best regards, Marcel
sent from my SGS3
Am 23.07.2013 16:41 schrieb “Marcel Schulte” schulte.marcel@gmail.com:
Hi Wes,
Does ‘Nagios and Check_MK report that the Jacada service is down (errorlevel = 1)’ mean ‘errorlevel = 1’ is reported in the braces? If so it seams as if this is contained in %errorlevel% - and not comparable with numbers…
But I have a question: why don’t you use CMK buitin check ‘services’ instead of the local script?
Best regards, Marcel
sent from my SGS3
Am 23.07.2013 16:32 schrieb “Wesley Merrill” wmerrill@uga.edu:
I have a simple batch file that I use to check services. I have used it on several different servers for different services by editing the search string and the output messages.
I have not had any problems with this batch file until yesterday when I tried to setup monitoring of the Jacada Server service on a pair of servers running Windows Server 2003 Enterprise SP2. Most of, if not all of, the servers that I have used this batch
file on before are running Windows Server 2008. Here is the batch file.
@echo off
net start | findstr /C:“Jacada” >nul
if %errorlevel% EQU 0 goto UP
if %errorlevel% GTR 0 goto DOWN
:UP
echo 0 Jacada_Server_Service - OK - Jacada Server service is up (%errorlevel%).
goto END
:DOWN
echo 2 Jacada_Server_Service - CRITICAL - Jacada Server service is down (%errorlevel%).
goto END
:END
Nagios and Check_MK report that the Jacada service is down (errorlevel = 1), but I know that the service is up because I can see that it is started in the Computer Management console.
I can also run the batch file manually in a Command Prompt window and I get “0 Jacada_Server_Service – OK – Jacada Server service is up (0).”
I have not been able to find a solution or even an explanation of what is causing this problem. The only difference that I can think of between this case and others where I have
used this same batch file is the OSes involved (2008 = no problem, 2003 = problem). Does anyone on this list have a suggestion for how to fix this problem? I am grateful for any help.
Wes Merrill
checkmk-en mailing list
checkmk-en@lists.mathias-kettner.de
http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en