Page 1 of 2
Default template creation - Automation
Posted: Thu Sep 10, 2015 9:42 am
by ranjitw
Hi ,
I am implementing a new nagios xi solution and I am pretty new to nagios XI . I would need guidance please
I want to apply default configuration check for windows and linux server what would be the best way to do this ?
I need to monitor all the disk drives present in the machine(Dont know how to get this info , CPU,memory ,all the automatic services and processes.
I am using NSclient++ for monitoring windows machines and nrpe agent for Linux servers. We will be mornitoring around 900 servers.
We are using deployment tool to get the Nsclient++ installed on the windows machines. Once the installation of agent is done is there a automated way where I can add the newly installed agent automatically to nagios xi ?
If anyone is having sample template and if someone explain me a scenario it will be of great help .
Regards,
Ranjit W
Re: Default template creation - Automation
Posted: Thu Sep 10, 2015 2:47 pm
by tmcdonald
In terms of getting machines automatically registered, there is no way to do this with active checks. If you were using passive you could use Unconfigured Objects:
https://assets.nagios.com/downloads/nag ... ith_XI.pdf
but with Active there is no such functionality.
I would run through whatever wizard you want to use, get a base set of services configured, then assign those services to a hostgroup and add any hosts that you want to that group so they pick up the checks.
Re: Default template creation - Automation
Posted: Tue Sep 15, 2015 12:46 am
by ranjitw
Hi,
While creating template I want to include all the services to monitoring for a server.
eg : on a windows machine in services.msc I want all the services with startup type as Automatic to be monitored using nagios . If any of the startup type set as automatic and status of the service is stopped then an alarm need to be generated.
What would be the way to configure this ?
I am currently using NSClient++ for monitoring Windows machines.
Regards,
Ranjit W
Re: Default template creation - Automation
Posted: Tue Sep 15, 2015 1:39 am
by Box293
I've got a bunch of examples here:
http://sites.box293.com/nagios/guides/c ... s/services
For your scenario:
Command:
Code: Select all
check_nrpe -H 192.168.142.137 -t 30 -c CheckServiceState -a ShowAll CheckAll
Output If All Are OK:
Code: Select all
OK: AudioEndpointBuilder: started, AudioSrv: started, BFE: started, CryptSvc: started, CscService: started, DcomLaunch: started, Dhcp: started, Dnscache: started, DPS: started, eventlog: started, EventSystem: started, FDResPub: started, gpsvc: started, iphlpsvc: started, LanmanServer: started, LanmanWorkstation: started, lmhosts: started, Mcx2Svc: stopped, MMCSS: started, MpsSvc: started, NetTcpPortSharing: stopped, NlaSvc: started, nsi: started, PcaSvc: started, PlugPlay: started, Power: started, ProfSvc: started, RemoteAccess: stopped, RpcEptMapper: started, RpcSs: started, SamSs: started, Schedule: started, SENS: started, SharedAccess: stopped, ShellHWDetection: started, Spooler: started, SysMain: started, Themes: started, TrkWks: started, UxSms: started, VMTools: started, Winmgmt: started
Output If A Service Is Stopped:
Code: Select all
CRITICAL: AudioEndpointBuilder: started, AudioSrv: started, BFE: started, CryptSvc: started, CscService: started, DcomLaunch: started, Dhcp: started, Dnscache: started, DPS: started, eventlog: started, EventSystem: started, FDResPub: started, gpsvc: started, iphlpsvc: started, LanmanServer: started, LanmanWorkstation: started, lmhosts: started, Mcx2Svc: stopped, MMCSS: started, MpsSvc: started, NetTcpPortSharing: stopped, NlaSvc: started, nsi: started, PcaSvc: started, PlugPlay: started, Power: started, ProfSvc: started, RemoteAccess: stopped, RpcEptMapper: started, RpcSs: started, SamSs: started, Schedule: started, SENS: started, SharedAccess: stopped, ShellHWDetection: started, Spooler: stopped (critical), SysMain: started, Themes: started, TrkWks: started, UxSms: started, VMTools: started, Winmgmt: started
Re: Default template creation - Automation
Posted: Tue Sep 15, 2015 2:03 am
by ranjitw
Hi,
Thanks for the quick response in the below example is it checking for only for startup type automatic ?
check_nrpe -H 192.168.142.137 -t 30 -c CheckServiceState -a ShowAll CheckAll
For Output If A Service Is Stopped can we populate only the problematic service ? If we remove ShowAll from the command will it show only the problematic service?
Regards,
Ranjit W
Re: Default template creation - Automation
Posted: Tue Sep 15, 2015 2:17 am
by Box293
ranjitw wrote:Thanks for the quick response in the below example is it checking for only for startup type automatic ?
Correct.
ranjitw wrote:For Output If A Service Is Stopped can we populate only the problematic service ? If we remove ShowAll from the command will it show only the problematic service?
Correct:
Code: Select all
Command:
check_nrpe -H 192.168.142.137 -t 30 -c CheckServiceState -a CheckAll
Output:
CRITICAL: ShellHWDetection: stopped (critical)
Re: Default template creation - Automation
Posted: Tue Sep 15, 2015 2:23 am
by ranjitw
Thanks Box293 ,
I am currently using Nagios XI is there a way to configure this from front end ?
Regards,
Ranjit W
Re: Default template creation - Automation
Posted: Tue Sep 15, 2015 11:27 am
by tmcdonald
Absolutely!
Nagios XI includes the Core Configuration Manager, which is a web-based frontend for managing your config files. Check out this doc for more:
https://assets.nagios.com/downloads/nag ... gement.pdf
Re: Default template creation - Automation
Posted: Tue Sep 15, 2015 11:28 am
by ssax
Yes there is:
Go to Configure > Core Config Manager > Services
- Click the Add New button
- Select the check command: check_nrpe
- Set $ARG1$ to: CheckServiceState
- Set $ARG2$ to: -t 30 -a CheckAll
- Setup the rest of the service settings that you want, save, and apply configuration.
Let me know if you have any questions.
Re: Default template creation - Automation
Posted: Wed Sep 16, 2015 12:21 am
by ranjitw
Thanks tmcdonald ,ssax ,
I have applied the configuration and tested it using the "test Check Command " option and its working . I have tested it in the nagios core environment as well and its working.
I could not apply the configuration still because of another issue. Will try it once the issue is resolved.
Thanks a lot for your guidance .
Regards,
Ranjit W