G 'Day Customer Support,
So I am really trying to establish my standards for using the NCPA in Passive configuration mode.
So I have run into a snag...seems like I cannot determine a proper format to define within the passive cfg file to recognize service names that contain spaces.
SERVICE_NAME: BMC Remote Service Monitor
Formats tested and all failed.
%HOSTNAME%|Custom06 = /services --service BMC%20Remote%20Service%20Monitor --check true --status running
%HOSTNAME%|Custom07 = /services --service "BMC%20Remote%20Service%20Monitor" --check true --status running
%HOSTNAME%|Custom08 = /services --service 'BMC%20Remote%20Service%20Monitor' --check true --status running
%HOSTNAME%|Custom09 = /services --service BMC Remote Service Monitor --check true --status running
%HOSTNAME%|Custom10 = /services --service "BMC Remote Service Monitor" --check true --status running
%HOSTNAME%|Custom11 = /services --service 'BMC Remote Service Monitor' --check true --status running
How can we get Service Names that contain spaces to be recognized in the passive config files? All my service names that contain no spaces function exactly as expected.
Please help and as always many thanks,
Danny
NCPA Passive for Windows Service Issue
NCPA Passive for Windows Service Issue
You do not have the required permissions to view the files attached to this post.
Last edited by onegative on Mon Oct 02, 2017 11:04 am, edited 1 time in total.
Re: NCPA Passive for Windows Service Issue
Make sure you have the right service name and not just the display name. Opening up Windows' services and looking at the properties of the BMC Remote Service Monitor service will show you the service name at the very top of the General tab. You can also open the local browser to https://localhost:5693, go to the API section, and select services for the API Endpoint to get a list of services. Using the "Run as a Nagios check" will give you the option of viewing the correct format to use for active and passive checks.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NCPA Passive for Windows Service Issue
Yes I do in fact have the correct Service Name. As displayed from the Properties from Service Manager.
Also this is the latest 2.0.5 NCPA agent. I didn't test earlier but the API section from the agent is not displaying anything...but all other tabs are showing data...just the API section completes with no json data displaying...makes me think there is an issue with the 2.0.5 version. I tried it on multiple hosts with the same results for the 2.0.5 version...no joy for the API section of the Web GUI.
I will install 2.0.3 which is working on other hosts...perhaps someone should try the 2.0.5 version and its gui api url.
Anyway will let you know once I get the 2.0.3 version back on this server.
Thanks,
Danny
Also this is the latest 2.0.5 NCPA agent. I didn't test earlier but the API section from the agent is not displaying anything...but all other tabs are showing data...just the API section completes with no json data displaying...makes me think there is an issue with the 2.0.5 version. I tried it on multiple hosts with the same results for the 2.0.5 version...no joy for the API section of the Web GUI.
I will install 2.0.3 which is working on other hosts...perhaps someone should try the 2.0.5 version and its gui api url.
Anyway will let you know once I get the 2.0.3 version back on this server.
Thanks,
Danny
You do not have the required permissions to view the files attached to this post.
Re: NCPA Passive for Windows Service Issue
Can you try setting up the following service definition:
then saving your config file, exiting, and restarting the "NCPA Passive" service?
I tested a similar service (with spaces in the name/description) with NCPA ver. 2.0.5, and it seems to be running just fine.
My service definition:
In the GUI:
Update: Actually, instead of using "%20", use "+".
Example:
Code: Select all
%HOSTNAME%|BMC Remote Service Monitor = services?service=BMC%20Remote%20Service%20Monitor&status=runningI tested a similar service (with spaces in the name/description) with NCPA ver. 2.0.5, and it seems to be running just fine.
My service definition:
Code: Select all
%HOSTNAME%|AMD External Events Utility = services?service=AMD%20External%20Events%20Utility&status=runningExample:
Code: Select all
%HOSTNAME%|BMC Remote Service Monitor = services?service=BMC+Remote+Service+Monitor&status=runningYou do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NCPA Passive for Windows Service Issue
OK after further investigation...I determined the following:
First and foremost! Internet Explorer sucks! It was preventing the json data from being displayed via the agent's gui api tab. Installed Mozilla and viola!
So where does the documentation describing the use of "+" sign for space substitution? That seems extremely strange to me and personally I would have never thought to use it.
Since I choose to utilize match=regex this request can be closed as the regex solution is functional and it is not often that Windows Services names have spaces.
Thanks,
Danny
Does not work!
[/color]
Does work!
[/color]
First and foremost! Internet Explorer sucks! It was preventing the json data from being displayed via the agent's gui api tab. Installed Mozilla and viola!
So where does the documentation describing the use of "+" sign for space substitution? That seems extremely strange to me and personally I would have never thought to use it.
Since I choose to utilize match=regex this request can be closed as the regex solution is functional and it is not often that Windows Services names have spaces.
Thanks,
Danny
Does not work!
Code: Select all
%HOSTNAME%|Custom06 = /services --service BMC Remote Service Monitor --check true --status running
%HOSTNAME%|Custom06 = services?service=BMC Remote Service Monitor&status=running
Does work!
Code: Select all
%HOSTNAME%|Custom06 = /services --service BMC --match regex --check true --status running
%HOSTNAME%|Custom06 = services?service=BMC&match=regex&status=running
%HOSTNAME%|Custom06 = /services --service BMC+Remote+System+Monitor --check true --status running
%HOSTNAME%|Custom06 = services?service=BMC+Remote+System+Monitor&status=running
Re: NCPA Passive for Windows Service Issue
FYI - I just posted a new issue on GitHub here: https://github.com/NagiosEnterprises/ncpa/issues/390
It doesn't. I believe that spaces in names should be handled automatically, and you don't need to add pluses. I consider this to be a bug. Jake is aware of the issue, and he will be fixing it as soon as he can. Feel free to make any comments/suggestions on GitHub.So where does the documentation describing the use of "+" sign for space substitution? That seems extremely strange to me and personally I would have never thought to use it.
Be sure to check out our Knowledgebase for helpful articles and solutions!