ATOMIC SUPERGEEK
  • Welcome
  • LDAP
    • LDAP Basics
    • Using LDIFs
    • Searching LDAP
    • Command line ldap tools
  • eDirectory
    • Installing eDir on Linux
    • eDir ndsbackup
  • Scripting
    • BASH Scripting >
      • BASH Variables
  • Linux
    • Managing Startup
    • Setting up SSH key login
    • Using cron
    • Comparing files
    • Find command
    • grep basics
    • Time config with ntp
  • DevOps
    • Terraform >
      • Terraform Installation
  • Welcome
  • LDAP
    • LDAP Basics
    • Using LDIFs
    • Searching LDAP
    • Command line ldap tools
  • eDirectory
    • Installing eDir on Linux
    • eDir ndsbackup
  • Scripting
    • BASH Scripting >
      • BASH Variables
  • Linux
    • Managing Startup
    • Setting up SSH key login
    • Using cron
    • Comparing files
    • Find command
    • grep basics
    • Time config with ntp
  • DevOps
    • Terraform >
      • Terraform Installation

Nagios Remote Server Configuration File

11/13/2017

0 Comments

 
When you are setting up Nagios to monitor remote servers you need to create a new cfg file for each remote server. If you are monitoring a remote Linux server there are a listing of 7 services that are very typically set up to monitor by default. These are the same as what is the default set for the localhost list on your Nagios monitoring server. Here is a sample of what you would put into a file for a Linux server. In this case my server is named Kittyhawk and I would call the configuration file kittyhawk.cfg. Typically you would put this file in /etc/nagios/servers or you might find you need to put it in /usr/local/nagios/etc/servers.

define host {
       use             linux-server
       host_name         kittyhawk
       alias             My second server
       hostgroups         linux-servers
       address             xxx.xxx.xxx.xxx
       max_check_attempts     5
       check_period         24x7
       notification_interval     30
       notification_period     24x7
}

define service {
       use             generic-service
       host_name                       kittyhawk
       service_description     SSH
       check_command     check_ssh
       notifications_enabled     0
}

define service{
   use                 generic-service
   host_name             kittyhawk
   service_description     CPU Load
   check_command         check_nrpe!check_load
}

define service{
   use                 generic-service
   host_name             kittyhawk
   service_description     Current Users
   check_command         check_nrpe!check_users
}

define service{
   use                 generic-service
   host_name             kittyhawk
   service_description     Boot disk space
   check_command         check_nrpe!check_boot_disk
}


define service{
   use                 generic-service
   host_name             kittyhawk
   service_description     Root disk space
   check_command         check_nrpe!check_root_disk
}

define service{
   use                 generic-service
   host_name             kittyhawk
   service_description     Total Processes
   check_command         check_nrpe!check_total_procs
}

define service{
   use                 generic-service
   host_name             kittyhawk
   service_description     Zombie Processes
   check_command         check_nrpe!check_zombie_procs
}


​
You can add more services to monitor for the remote server depending on what it does and what you need to monitor. This one also assumes you are using nrpe to connect to the remote server. 
0 Comments



Leave a Reply.

    Author

    I am truly a geeks geek. I have worked in computers for over three decades. I have worked on mainframes, Unix systems, Linux before almost anyone knew what it was, and many other systems. I love computers, and love making them do things people think is impossible. 

    Archives

    January 2018
    December 2017
    November 2017
    October 2017
    June 2017
    May 2017
    March 2017
    September 2016
    August 2016

    Categories

    All

    RSS Feed

Home

About

Services

Copyright © 2016