z

Commercial Support Clients: Clients with support contracts can get escalated support assistance by visiting Nagios Answer Hub. These forums are for community support services. Although we at Nagios try our best to help out on the forums here, we always give priority support to our support clients.

Nagios to perform self resolution on know issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.

Nagios to perform self resolution on know issues

Postby Deepika_Gupta » Mon Feb 28, 2022 10:48 am

Hello,
we have created a few powershell script to perform some self healing actions for known issues. This requires us to keep copy scripts on every target server and update the ".ini" file for all script entries. We manually tested the steps by copying these scripts to around 100 servers. For production we need to deploy the changes on many more servers. We also need to manage revisions of the scripts centrally.

Could you please suggest a best possible way to manage the scripts centrally like - Nagios client should be able to balance all the files with all the servers, where NSClient service is running.
Deepika_Gupta
 
Posts: 4
Joined: Wed Feb 16, 2022 11:14 am

Re: Nagios to perform self resolution on know issues

Postby gsmith » Wed Mar 02, 2022 4:06 pm

Hi

Depending on how "cute" you want to get, you can either:
a) push out the latest script and .ini files to every server you are monitoring every evening at a certain time, with the option to have an immediate "push" for when you make an update
b) have the script/ini file contain a "revision" parameter in it, and have the remote machines call out to the XI server and check on what the latest version is for the script and ini file files. If either file on the XI server is newer than the one on the machine being monitored the machine being monitored should download the latest script/ini files, and should run a check with the new files to verify the configuration is is working.

Thanks
gsmith
 
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Nagios to perform self resolution on know issues

Postby Deepika_Gupta » Fri Mar 11, 2022 5:04 am

Thanks Smith.

Could you please also suggest how we can get remote machines to call out XI server for checking the script and ini file revision number.
Deepika_Gupta
 
Posts: 4
Joined: Wed Feb 16, 2022 11:14 am

Re: Nagios to perform self resolution on know issues

Postby Deepika_Gupta » Wed Mar 16, 2022 9:38 am

Hey Smith,

Could you please share a example for adding the revision and calling XI server from remote servers.

Thanks
Deepika_Gupta
 
Posts: 4
Joined: Wed Feb 16, 2022 11:14 am

Re: Nagios to perform self resolution on know issues

Postby gsmith » Mon Mar 21, 2022 1:07 pm

Hi

What you would need to do is set up an NFS share on the Nagios server with Samba enabled. In that share
you would have the latest script/ini file. On the remote Windows machines you would need a bat or powershell
script that would get the file shared out on the Nagios server. The bat or powershell script would need to be
scheduled to run via the Task Manager on the Windows machines. This would be considered a "pull" method.

There would be a lot less network/communications overhead if you had the Nagios server push out the script/ini
file (aka the "push" method) as the admin of Nagios would know if a new remote server was added or if a change is
made to the script/ini file. When that occurs the admin could push the updated script to the machines being monitored.

Thanks
gsmith
 
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Nagios to perform self resolution on know issues

Postby Deepika_Gupta » Wed Mar 30, 2022 8:58 am

Thanks Smith.

I am interested in using the push method. could you please share any document or guide me on how to implement this in our infrastructure.

Thanks,
Deepika
Deepika_Gupta
 
Posts: 4
Joined: Wed Feb 16, 2022 11:14 am

Re: Nagios to perform self resolution on know issues

Postby gsmith » Wed Mar 30, 2022 9:35 am

Hi

Pushing a script from a Linux machine to Windows machine is an OS function
and not directly related to Nagios, so I can't spend time on it detailing a solution.

But to get you started:

enable this in Windows firewall:
Remote Service Management (NP-In)

install samba on XI server:
yum -install -y samba

use the "net rpc" command to test command from XI. It seems the user must be a Domain Admin
Code: Select all
[root@localhost ~]# net rpc -I 192.168.254.233 -U nagios/gsmith%XXXXXXXXX service start ncpalistener
   ....
   Successfully started service: ncpalistener


On the XI server use "man net" and look at the rpc section for more details.

If you have any additional questions please open a ticket in our new support system:
We're moving to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.


Thanks
gsmith
 
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am


Return to Nagios XI

Who is online

Users browsing this forum: No registered users and 5 guests