Wrong Service is showing up

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
ZebMatthias
Posts: 6
Joined: Tue Jan 22, 2019 1:27 pm

Wrong Service is showing up

Post by ZebMatthias »

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.
nagios result.PNG
nagios settings.PNG

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

Post by npolovenko »

Hello, @ZebMatthias. $ is a reserved application character in Nagios. Let's try running the command with arguments from the ssh terminal:
/usr/local/nagios/libexec/check_wmi_plus.pl -H $HOSTADDRESS$ -u 'user' -p 'password' -m checkservice 'MicrosoftDynamicsNavServer$NAS'
Please replace $HOSTADDRESS$ with the hostaddress, also replace user and password with the actual credentials and run the command.
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

Post by ZebMatthias »

Hello ,

Like you see in attachment in my previos mail -> hostadress is filled and user and password
See attachment
Nagios command.PNG
greetings,
Matthias Deruyver
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Wrong Service is showing up

Post by lmiltchev »

What is the version of the check_wmi_plus.pl plugin that you are currently using?

Code: Select all

grep '$VERSION=' /usr/local/nagios/libexec/check_wmi_plus.pl
Log into the Windows server, start a CMD prompt as administrator, run the following command and show the output:

Code: 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

Post by ZebMatthias »

Version of the wmy plugin : 1.64

The result of the connection with windows server :
print wmic cmd.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Wrong Service is showing up

Post by lmiltchev »

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?

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl -H $HOSTADDRESS$ -u 'user' -p 'password' -m checkservice 'Microsoft Dynamics NAV Server [NAS]'
or

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

Post by ZebMatthias »

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
nagios nas 1.PNG
nagios nas 2.PNG
nagios nas 3.PNG
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

Post by ZebMatthias »

nagios nas 4.PNG
nagios nas 5.PNG
nagios nas 6.PNG
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Wrong Service is showing up

Post by tgriep »

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

Post by ZebMatthias »

i have uses another command to show all services and there i see all the servcies running even the Microsnosftnav - see screenshot.
print nagios 1.PNG
When checking for antoher service, without $ in the name - i still only get netbios helper as result .
print nagios 2.PNG
You do not have the required permissions to view the files attached to this post.
Locked