Sie sind auf Seite 1von 2

should be separated by commas. The hostgroup_members directive may be used instead of, the members directive.

So a group of host groups can be created.


define service{ host_name service_description check_command use } define hostgroup{ hostgroup_name alias members } define host{ host_name alias address use } Legal: Nagios and Nagios Logo are owned by Nagios Enterprises. gateway Default Gateway 192.168.1.1 generic-host Webservers Web servers on internet web-server, mail-server gateway PING check_ping!100,20%!500,60% generic-service

Description: directive. Description:

host_name: A short name to identify the host. The hostgroup_name directive may be used instead of, or in addition to, the host_name service_description: A description of the service. check_command: The short name of the command used to check

hostgroup_name: A short name used to identify the host group. alias: A description to identify the host group. members: A list of the short names of the hosts. Multiple host names

status of the service.

Description:

host_name: A short name to identify the host. alias: A description to identify the host. address: Endereo IP ou nome DNS. use: Template.

Hosts

Service

Host group

define serviceextinfo{ host_name service_description icon_image icon_image_alt notes notes_url }

After Nagios 3.x, all extended information can be used directly on host/service definitions. Conventional extended information format will continue to be supported for backward compatibility.
service_description: A description of the service. define hostextinfo{ host_name icon_image icon_image_alt statusmap_image notes_url } icon_image: Define the name of a image file (gif, png or jpg format).

host_name: A short name to identify the host.

Tip:

icon_image_alt: An optional string that is showed when the mouse is

over the icon image on web interface. statusmap_image: A image file used on status map (GD2 format).
notes: An optional string of notes pertaining to the object. notes_url: An optional URL that can be used to provide more

Description:

information about the object.

define servicegroup{ servicegroup_name Mail alias Mail related services members NS1,DNS, mail-server,SMTP, mailserver, POP3, mail-server,IMAP }

group. alias: A description to identify the service group. members: A list of the descriptions of services and the name of their corresponding hosts that should be included in this group. Host and service should be separated by commas. The format is $HOSTNAME $, $SERVICEDESC$, $HOSTNAME$, $SERVICEDESC$, etc... The servicegroup_members directive may be used instead of, the members directive. So a group of service groups can be created.
gateway Network traffic traffic.png Traffic packet data Traffic on interface eth1 http://example.com gateway black_box.png Linux router - Yeah! black_box.gd2 http://example.com/

Description:

servicegrop_name: A short name used to identify the service

Extended Information Service group

max_check_attempts notification_interval notification_period contact_groups check_period notification_options notification_options

max_check_attempts: The number of times that is defined to retry check command before generate an alert. notification_interval: The time to wait before re-notifying. notification_period: The short name of the time period during which notifications of events can be sent. contact_groups: A list of the short names of the contact groups that should be notified whenever there are alerts. check_period: The time period used in active checks. notification_options: Notifications should be sent out when: d: Host down. u: Host unreachable, or Service unknown state. r: recovery (OK State). w: Service warning. c: Service critical. f: Flapping (start and stop). s: Scheduled downtime (start and end). n: No notification will be sent out. define host{ host_name alias address use parents }

Use the options bellow both hosts and services: Use the options bellow in host definitions: Description: Example: Use the options bellow in service definitions:
mail-server Foo Mail Server mail-server.example.com generic-host gateway 4 240 24x7 admins 24x7

Use the parents option in a host denition to organize the Status Map. This option also enable Nagios to recognize unreacheable hosts when a parent host is down.

Status Map

Notification

d,u,r,f,s

w,u,c,r,f,s

Das könnte Ihnen auch gefallen