Welcome to docs.opsview.com

Differences

This shows you the differences between two versions of the page.

opsview-core:migrating:nagios [2012/04/30 15:38]
127.0.0.1 external edit
opsview-core:migrating:nagios [2012/05/15 15:44] (current)
tonvoon Removed section around passive slave
Line 144: Line 144:
Opsview has a feature where if the host has no notifications set, then the service will also not have any notification options - this could account for the discrepancy. Opsview has a feature where if the host has no notifications set, then the service will also not have any notification options - this could account for the discrepancy.
-===== Planning your partial migration ===== 
-This functionality is available from Opsview 3.11.0. 
-==== Overview ==== 
-For those instances where Nagios Core monitoring cannot be moved to Opsview easily and quickly, the Nagios Core server can configured as a passive slave in Opsview. 
- 
-The Nagios Core server then uses NSCA functionality to send all the results back into Opsview over a secure channel so Opsview can then perform all the necessary alerting and reporting until such time that the Nagios Core server can be fully migrated. 
- 
-This form of passive slave must be carefully considered to ensure there are no host name clashes with hosts that have already been configured in Opsview. 
- 
-==== Initial Configuration ==== 
- 
-=== Opsview configuration === 
- 
-  * The opsview server needs to have ssh access to the Nagios Core server as user ''nagios'' 
-  * Create the Nagios Core server as a normal host in Opsview 
-  * Create a new monitoring server (Menu => Advanced => Actions => Create new Monitoring Server), set the Nagios Core server as the 'Cluster Node' and tick the 'Passive' checkbox, then 'Submit' 
-  * Run ''send2slaves -t'' to test the configuration 
-  * Do a reload. 
- 
-At this point the slave will be generating errors such as "SLAVE CRITICAL - Error retrieving slave information - slave is likely to be down" in Opsview. 
- 
-=== Nagios Core server configuration === 
- 
-  * As the ''nagios'' user ensure the following directories exist under /usr/local/nagios 
-    * bin 
-    * etc 
-    * var 
-  * Install ''send_nsca'' (might be part of the 'nsca' package on your platform) 
-  * Copy the send_nsca binary (can be in /usr/sbin/) to /usr/local/nagios/bin 
-  * Copy ''/usr/local/nagios/etc/send_nsca.cfg'' from the Opsview server to the Nagios Core server into the same place 
-  * Copy ''/usr/local/nagios/bin/process-cache-data'' and ''retrieve_opsview_info'' from the Opsview server to the Nagios Core server into the same place 
-  * Symlinks the nagios ''status'dat'' file to /usr/local/nagios/var 
-  * Create and make executable ''/usr/local/nagios/bin/process-cache-data.sh'' containing 
-<code> 
-#!/bin/bash 
-/usr/local/nagios/bin/process-cache-data $@ 
-</code> 
- 
-A this point the following changes need to be made to the nagios configuration and nagios restarted. 
- 
-  * Add the following configuration to ''commands.cfg'' or other suitable configuration file 
-<code> 
-define command { 
-        command_name   process-host-perfdata-file 
-        command_line   /usr/local/nagios/bin/process-cache-data.sh cache_host 
-} 
- 
-define command { 
-        command_name   process-service-perfdata-file 
-        command_line   /usr/local/nagios/bin/process-cache-data.sh cache_service 
-e 
-} 
-</code> 
-  * Amend the ''nagios.cfg'' file to add or replace the following configuration 
-<code> 
-process_performance_data=1 
-host_perfdata_file=/usr/local/nagios/var/cache_host.log 
-service_perfdata_file=/usr/local/nagios/var/cache_service.log 
-host_perfdata_file_template=$HOSTNAME$\t$HOSTSTATE$\t$HOSTOUTPUT$|$HOSTPERFDATA$ 
-service_perfdata_file_template=$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEOUTPUT$|$SERVICEPERFDATA$ 
-host_perfdata_file_mode=a 
-service_perfdata_file_mode=a 
-host_perfdata_file_processing_interval=5 
-service_perfdata_file_processing_interval=5 
-host_perfdata_file_processing_command=process-host-perfdata-file 
-service_perfdata_file_processing_command=process-service-perfdata-file 
-</code> 
-  * Reload Nagios Core 
- 
-At this point results should be passed up to Opsview from the Nagios Core server.  Look at the Opsview server log file /usr/local/nagios/var/nagios.log for entries such as the following: 
-<code> 
-[TIMESTAMP] Warning:  Passive check result was received for host 'HOSTNAME', but the host could not be found! 
-[TIMESTAMP] Warning:  Passive check result was received for service 'SERVICE' on host 'HOSTNAME', but the host could not be found! 
-</code> 
- 
-==== Using the Partial Migration Tool ==== 
- 
-A tool has been provided on the master server as ''/usr/local/nagios/utils/list_unknown_devices'' which would output a report similar to the following: 
-<code> 
-Host 'gateway' missing 
-Host 'localhost' missing service 'Current Load' 
-Host 'localhost' missing service 'Current Users' 
-Host 'localhost' missing service 'Disk Space' 
-Host 'localhost' missing service 'HTTP' 
-Host 'localhost' missing service 'SSH' 
-Host 'localhost' missing service 'Total Processes' 
-</code> 
- 
-These hosts and services should be created by hand with appropriate host templates assigned.  It works by parsing the current ''nagios.log'' file searching for 'host could not be found' and 'service could not be found' errors. 
- 
-Care should be taken to ensure hosts are assigned to the correct passive slave and that there isn't already a host with the same name in the Opsview configuration. 
- 
-==== Troubleshooting ==== 
Navigation
Print/export
Toolbox