Any way of posting a new plugin to multiple hosts at one go

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
fm2ahmed
Posts: 32
Joined: Wed Oct 09, 2013 9:41 am

Any way of posting a new plugin to multiple hosts at one go

Post by fm2ahmed »

Hi,

Does anyone know a way of rolling out a check at one go to 100-200 hosts??
We use Nagios CORE for around 110 hosts now and I am looking at introducing SElinux check for all hosts. (I do know using NagiosXI might help in that but we can't use it/implement it at the moment)

Any suggestions would be appreciated.

Regards,
Farooq Ahmed
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Any way of posting a new plugin to multiple hosts at one

Post by abrist »

My suggestion would be to make a hostgroup for this check and possibly others. Add all the hosts to the group. Then create a generic selinux service check. Add the hostgroup we created earlier, but not any of the hosts. Now, any host added to this group will inherit the check.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
fm2ahmed
Posts: 32
Joined: Wed Oct 09, 2013 9:41 am

Re: Any way of posting a new plugin to multiple hosts at one

Post by fm2ahmed »

HI,

Thanks for your reply. BUt I am confused with this "Then create a generic selinux service check". Can you explain a bit more as to I would be able to create this service check for all hosts at one go?? I dont think that would be possible as it would creation of plugin on all hosts and then editing nrp.cfg on all hosts.

Waiting for your reply.

Regards,
Farooq Ahmed
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Any way of posting a new plugin to multiple hosts at one

Post by abrist »

Well, if the check is run through an agent, you will have to configure the agent and install the plugin on the remote hosts. Some people use puppet to to push the files, while others manage it by hand.

This does not change the fact that you can create a service check for multiple hosts with one check, but if that check uses an agent you will need to configure the agent as well.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
fm2ahmed
Posts: 32
Joined: Wed Oct 09, 2013 9:41 am

Re: Any way of posting a new plugin to multiple hosts at one

Post by fm2ahmed »

Hi,

Yes we user nrpe agent for service checks on hosts and I am the one who had done it by hands till now.

Can i ask how would i go about configuring the agent ?? as u said -- >"but if that check uses an agent you will need to configure the agent as well"

Regards,
Farooq Ahmed
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Any way of posting a new plugin to multiple hosts at one

Post by slansing »

Right, so if you are using "NRPE" for example, and you are adding a custom plugin, you will need to make sure that that plugin is installed on the remote host that the NRPE agent resides on, and then create a command definition to call that plugin. These definitions are housed in the nrpe.cfg file, and you can use the predefined ones as an example.

For CENTOS/RHEL servers the configuration file is normally located in:

Code: Select all

/usr/local/nagios/etc/nrpe.cfg
After making changes, be sure to restart xinetd:

Code: Select all

service xinetd restart
Or the daemon, if you are using the daemonized mode.
fm2ahmed
Posts: 32
Joined: Wed Oct 09, 2013 9:41 am

Re: Any way of posting a new plugin to multiple hosts at one

Post by fm2ahmed »

HI,

Ok thanks. Can close this thread.

Regards,
Farooq Ahmed
Locked