Showing posts with label Nagios. Show all posts
Showing posts with label Nagios. Show all posts

Monday, 26 March 2012

Nagios 3.3.1 bug - Host stuck in scheduled down time
















Setup
Ubuntu: 10.04.4
Nagios: 3.3.1
Plugins 1.4.14

Host scheduled for downtime but downtime have exceeded and host is still stuck in downtime.
Unable to get host out of the downtime

RESOLUTION

Remove Host from Nagios complete, do a reboot, recreate host - this was the only way I could get my host from being stuck in a downtime situation.


Thursday, 2 June 2011

Monitoring Pervasive PSQL with Nagios

Nagios 3.2.3 monitoring Pervasive PSQL running on Windows 2003 Server

To monitor Pervasive you have to monitor the following 3 executables:
The reason I monitor these executables instead of the service name is because the service name contains 2 brackets and Nagios refuse to monitor them.

Service names:
Pervasive PSQL Relational Engine - Pervasive.SQL(relational)
Pervasive PSQL Transactional Engine - Pervasive.SQL(transactional)


To monitor Pervasive you have to monitor the following 3 executables:

Pervasive PSQL




NTDBSMGR.EXE

Pervasive PSQL Relational Engine




w3sqlmgr.exe

Pervasive PSQL Relational Engine Transactional




ntbtrv.exe
 

Thursday, 31 March 2011

Nagios Error: Check command not defined anywhere!


Error: Service check command 'check_disk_remote' specified in service 'check_disk_remote' for host 'Nagios-CPT' not defined anywhere!








Location check:

** Plugin located in /usr/local/nagios/libexec/
** Commands.cfg --> is the service defined?
** services.cfg --> is the service defined to be used with a host?

Friday, 25 March 2011

Nagios - Monitoring Eventlogs on Windows Servers (My Comprehensive Guide)

Monitor DNS events on Windows Servers

  • Copy eventlog_agent files to c:\
  • Create folder on c:\ called "programme" 
  • Create subfolder "eventlog_agent"
  • Copy the eventlog_agent files (.exe, .bat, .reg) to c:\programme\eventlog_agent\
  • Run eventlog_agent.exe (if doing it manually)
http://naplax.sourceforge.net/install_check_win_eventlog.txt
 Create /usr/local/nagios/etc/objects/eventlogs.cfg

  • add "eventlogs.cfg" to nagios.cfg
  • Add hosts to eventlogs.cfg
Contents - eventlogs.cfg

define service{
       service_description    System Eventlog
       use                             generic-service
       check_command         check_win_eventlog!a!System!.*:+1
       max_check_attempts     1
       host_name                    Recruit
       contact_groups             admins
       is_volatile                     1
}



define service{
       service_description       DNS Eventlog
       use                              generic-service
       check_command          check_win_eventlog!a!DNS!.*:+1
       max_check_attempts     1
       host_name                    Recruit
       contact_groups             admins
       is_volatile                      1
}


define service{
       service_description      Directory Service Eventlog
       use                               generic-service
       check_command          check_win_eventlog!a!Directory Service!.*:+1
       max_check_attempts     1
       host_name                    Recruit
       contact_groups             admins
       is_volatile                     1

define service{
       service_description    File Replication Service Eventlog
       use                            generic-service
       check_command          check_win_eventlog!a!File Replication Service!.*:+1
       max_check_attempts     1
       host_name                   Recruit
       contact_groups            admins
       is_volatile                     1
}

The bits in red needs to be filled in correctly.

Errors

If eventlog.exe not running you'll get this error message


Current Status:
CRITICAL  
 (for 0d 0h 1m 57s)
Status Information:An Error occured before state could be read: Connection refused at /usr/local/nagios/libexec/check_win_eventlog.pl line 145.


If errors continue - restart the .exe running on the host

To automate & install the .exe as a service

You will need 'instsrv.exe' and 'srvany.exe' from Microsoft Resource Kit.
Just copy those files together with 'eventlog_agent.exe', 'eventlog_agent.bat' and
'eventlog_agent.reg' into the folder 'c:\programme\eventlog_agent' and run the
batch file. If you want to use a different folder, then you will need to modify
the path in 'eventlog_agent.bat' and 'eventlog_agent.reg'
Autostart

You may put the exe into your Systems Autostart Folder. But this requires that there is
someone logged in.

Uninstall the eventlog_agent
If you used installation method a) or c), then can just delete the Files.
If you used installation method b), then you go into the installation directory
and call "eventlog_agent.bat stop" on the console.