Wrong Service is showing up
-
ZebMatthias
- Posts: 6
- Joined: Tue Jan 22, 2019 1:27 pm
Wrong Service is showing up
Hello ,
I'm currently using the Trial version of Nagios for testing but i'm facing a problem when checking a service.
Version of Nagios : 5.5.8
Service we are looking for : MicrosoftDynamicsNavServer$NAS and MicrosoftDynamicsNavServer$POSDB = Service name
the wizard we are using : wmi
code : check_xi_service_wmiplus!'user'!'password'!checkservice!'MicrosoftDynamicsNavServer$NAS'!!!!
result : OK - Found 1 Services(s), 1 OK and 0 with problems (0 excluded). 'TCP/IP NetBIOS Helper' (lmhosts) is Running.
We don't receive any error but we get another service as result ( see above )
printscreens in attachment of the settings and result.
Thx for the help,
greetings,
Matthias
I'm currently using the Trial version of Nagios for testing but i'm facing a problem when checking a service.
Version of Nagios : 5.5.8
Service we are looking for : MicrosoftDynamicsNavServer$NAS and MicrosoftDynamicsNavServer$POSDB = Service name
the wizard we are using : wmi
code : check_xi_service_wmiplus!'user'!'password'!checkservice!'MicrosoftDynamicsNavServer$NAS'!!!!
result : OK - Found 1 Services(s), 1 OK and 0 with problems (0 excluded). 'TCP/IP NetBIOS Helper' (lmhosts) is Running.
We don't receive any error but we get another service as result ( see above )
printscreens in attachment of the settings and result.
Thx for the help,
greetings,
Matthias
You do not have the required permissions to view the files attached to this post.
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Wrong Service is showing up
Hello, @ZebMatthias. $ is a reserved application character in Nagios. Let's try running the command with arguments from the ssh terminal:
Please replace $HOSTADDRESS$ with the hostaddress, also replace user and password with the actual credentials and run the command./usr/local/nagios/libexec/check_wmi_plus.pl -H $HOSTADDRESS$ -u 'user' -p 'password' -m checkservice 'MicrosoftDynamicsNavServer$NAS'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
ZebMatthias
- Posts: 6
- Joined: Tue Jan 22, 2019 1:27 pm
Re: Wrong Service is showing up
Hello ,
Like you see in attachment in my previos mail -> hostadress is filled and user and password
See attachment greetings,
Matthias Deruyver
Like you see in attachment in my previos mail -> hostadress is filled and user and password
See attachment greetings,
Matthias Deruyver
You do not have the required permissions to view the files attached to this post.
Re: Wrong Service is showing up
What is the version of the check_wmi_plus.pl plugin that you are currently using?
Log into the Windows server, start a CMD prompt as administrator, run the following command and show the output:
Code: Select all
grep '$VERSION=' /usr/local/nagios/libexec/check_wmi_plus.plCode: Select all
wmic service get name, displayname | findstr "MicrosoftDynamicsNavServer"Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ZebMatthias
- Posts: 6
- Joined: Tue Jan 22, 2019 1:27 pm
Re: Wrong Service is showing up
Version of the wmy plugin : 1.64
The result of the connection with windows server :
The result of the connection with windows server :
You do not have the required permissions to view the files attached to this post.
Re: Wrong Service is showing up
It is very strange that a wrong service is showing up. The service display name is exactly what you are using in your check. Most probably, the check fails because of the dollar sign in the name. Try escaping it by using 'MicrosoftDynamicsNavServer\$NAS' or 'MicrosoftDynamicsNavServer\$$NAS'. You can try using double quotes, instead of single quotes as well - "MicrosoftDynamicsNavServer\$NAS" or "MicrosoftDynamicsNavServer\$$NAS".
Do you get the correct service if you use the actual name instead of the display name?
or
Do you get the correct service if you use the actual name instead of the display name?
Code: Select all
/usr/local/nagios/libexec/check_wmi_plus.pl -H $HOSTADDRESS$ -u 'user' -p 'password' -m checkservice 'Microsoft Dynamics NAV Server [NAS]'Code: Select all
/usr/local/nagios/libexec/check_wmi_plus.pl -H $HOSTADDRESS$ -u 'user' -p 'password' -m checkservice "Microsoft Dynamics NAV Server \[NAS\]"Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ZebMatthias
- Posts: 6
- Joined: Tue Jan 22, 2019 1:27 pm
Re: Wrong Service is showing up
I have tried every combo possible : 'MicrosoftDynamicsNavServer\$NAS' , 'MicrosoftDynamicsNavServer\$$NAS' , "MicrosoftDynamicsNavServer\$NAS" and "MicrosoftDynamicsNavServer\$$NAS". also with the display name "Microsoft Dynamics NAV Server \[NAS\]" and 'Microsoft Dynamics NAV Server [NAS]' . but still showing the wrong service : 'TCP/IP NetBIOS Helper'
see attachments
see attachments
You do not have the required permissions to view the files attached to this post.
Last edited by ZebMatthias on Thu Jan 24, 2019 1:53 pm, edited 1 time in total.
-
ZebMatthias
- Posts: 6
- Joined: Tue Jan 22, 2019 1:27 pm
Re: Wrong Service is showing up
You do not have the required permissions to view the files attached to this post.
Re: Wrong Service is showing up
When a name has a $ in it, is sometimes has to be escaped differently then the standard escaping. Try using this for the option.
Code: Select all
"MicrosoftDynamicsNavServer$"$"NAS"Be sure to check out our Knowledgebase for helpful articles and solutions!
-
ZebMatthias
- Posts: 6
- Joined: Tue Jan 22, 2019 1:27 pm
Re: Wrong Service is showing up
i have uses another command to show all services and there i see all the servcies running even the Microsnosftnav - see screenshot.
When checking for antoher service, without $ in the name - i still only get netbios helper as result .
You do not have the required permissions to view the files attached to this post.