Page 1 of 1

How to add a service

Posted: Thu Jul 27, 2017 2:21 pm
by donnyforbes
I am needing to add a new windows service called AaaFaxService. Please explain to me how I can do this.
Here is what we have now.

Re: How to add a service

Posted: Thu Jul 27, 2017 2:36 pm
by bolson
Hello donnyforbes,

Can you please be more specific about what it is you're trying to do? What agent is running on the Windows machine? Is aaafaxservice a service that is running on the Windows box? Are you just wanting to check to see if the service is running?

Re: How to add a service

Posted: Thu Jul 27, 2017 2:37 pm
by dwhitfield
In addition to @bolson's response, the immediate answer to your question is to go to http://YOURSERVER/nagiosxi/includes/com ... pe=service and click Add New.

Now, the real question is whether you need to add a command as well. If so, then https://assets.nagios.com/downloads/nag ... ios-XI.pdf will step you through the process.

Re: How to add a service

Posted: Thu Jul 27, 2017 3:20 pm
by donnyforbes
bolson wrote:Hello donnyforbes,

Can you please be more specific about what it is you're trying to do? What agent is running on the Windows machine? Is aaafaxservice a service that is running on the Windows box? Are you just wanting to check to see if the service is running?
Yes, AaaFaxservice is running on the windows server and I just need to know that its running and if it does not be notfiied. The agent is whatever the default ones is that you install in the configuration manger for windows servers..

Re: How to add a service

Posted: Thu Jul 27, 2017 3:54 pm
by dwhitfield
donnyforbes wrote:The agent is whatever the default ones is that you install in the configuration manger for windows servers..
Generally speaking, that's NSClient. You'll need to add the check on the NSClient side as well. Here is our NSClient documentation: https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: How to add a service

Posted: Thu Jul 27, 2017 4:13 pm
by donnyforbes
Generally speaking, that's NSClient. You'll need to add the check on the NSClient side as well. Here is our NSClient documentation: https://assets.nagios.com/downloads/nag ... ios-XI.pdf
The client is already installed. I remember seeing during the install a place to add this service, but forgot, now I am needing to add it. Please give me instruction on how. If not should I just remove it and do it all over again? I would think there is a better way then removing.

Re: How to add a service

Posted: Thu Jul 27, 2017 4:23 pm
by dwhitfield
That information is actually in that initial set up documentation. Here it is though:

Open the file C:\Program Files\NSClient++\nsclient.ini in Notepad.

Find this section in the file:
[/settings/external scripts/scripts]

If it doesn't exist then add it to the end of the file.


Under [/settings/external scripts/scripts] section add the following line:
check_dummy_bat = scripts\\check_dummy.bat $ARG1$ "$ARG2$"

Save the file and then use services.msc to restart the NSClient++ service.

Obviously, change it for your script.