Important: Nagios can be configured to use different methods for storing extended information. This documentation describes how to configure extended data definitions if you've compiled Nagios with support for default extended data routines (i.e. using the --with-default-extinfo argument to the configure script). Please note that this configuration format is provided primarily for backward compatability. It offers neither the flexibility nor clarity that the template-based extended data definitions do. I would highly suggest that you consider moving to the template-based config file, as it will be the standard in the future.
Introduction
When using the default extended data routines, both host and service extended information definitions must be placed in your CGI configuration file. Each definition should be on a seperate line in the config file.
Index
Extended host information
Extended service information
Extended Host Information |
Format: | hostextinfo[<host_name>]=<notes_url>;<icon_image>;<vrml_image>;<gd2_image>;<alt_tag>;<x_2d>,<y_2d>;<x_3d>,<y_3d>,<z_3d> |
Example: | hostextinfo[router3]=/hostinfo/router3.html;cat5000.png;cat5000.png;cat5000.gd2;Cisco Catalyst 5000;100,50;3.5,2.0,5.5 |
Extended host information entries are basically used to make the output from the status, statusmap, statuswrl, and extinfo CGIs look pretty. They have no effect on monitoring and are completely optional.
<host_name> | This is a short name of the host, as defined in the object configuration file. | |
<notes_url> | This is an optional URL that can be used to provide more information about the host. If you specify an URL, you will see a link that says "Notes About This Host" in the extended information CGI (when you are viewing information about the specified host). Any valid URL can be used. If you plan on using relative paths, the base path will the the same as what is used to access the CGIs (i.e. /cgi-bin/nagios/). This can be very useful if you want to make detailed information on the host, emergency contact methods, etc available to other support staff. | |
<icon_image> | The name of a GIF, PNG, or JPG image that should be associated with this host. This image will be displayed in the status and extended information CGIs. The image will look best if it is 40x40 pixels in size. Images for hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/nagios/share/images/logos). | |
<vrml_image> | The name of a GIF, PNG, or JPG image that should be associated with this host. This image will be used as the texture map for the specified host in the statuswrl CGI. Unlike the image you use for the <icon_image> variable, this one should probably not have any transparency. If it does, the host object will look a bit wierd. Images for hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/nagios/share/images/logos). | |
<gd2_image> | The name of a GD2 format image that should be associated with this host. This image will be used in the image created by the statusmap CGI. GD2 images can be created from PNG images by using the pngtogd2 utility supplied with Thomas Boutell's gd library. The GD2 images should be created in uncompressed format in order to minimize CPU load when the statusmap CGI is generating the network map image. The image will look best if it is 40x40 pixels in size. You can leave these option blank if you are not using the statusmap CGI. Images for hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/nagios/share/images/logos). | |
<alt_tag> | An optional string that is used in the ALT tag of the image specified by the <icon_image> argument. The ALT tag is used in both the status and statusmap CGIs. | |
<x_2d>,<y_2d> | Coordinates to use when drawing the host in the statusmap CGI. Coordinates should be given in positive integers, as the correspond to physical pixels in the generated image. The origin for drawing (0,0) is in the upper left hand corner of the image and extends in the positive x direction (to the right) along the top of the image and in the positive y direction (down) along the left hand side of the image. For reference, the size of the icons drawn is usually about 40x40 pixels (text takes a little extra space). The coordinates you specify here are for the upper left hand corner of the host icon that is drawn. Note: Don't worry about what the maximum x and y coordinates that you can use are. The CGI will automatically calculate the maximum dimensions of the image it creates based on the largest x and y coordinates you specify. | |
<x_3d>,<y_3d>,<z_3d> | Coordinates to use when drawing the host in the statuswrl CGI. Coordinates can be positive or negative real numbers. The origin for drawing is (0.0,0.0,0.0). For reference, the size of the host cubes drawn is 0.5 units on each side (text takes a little more space). The coordinates you specify here are used as the center of the host cube. |
Extended Service Information |
Format: | serviceextinfo[<host_name>;<svc_description>]=<notes_url>;<icon_image>;<alt_tag> |
Example: | serviceextinfo[router3;PING]=/serviceinfo/router3.html#PING;ping.png;PING Stats |
Extended service information entries are basically used to make the output from the status and extinfo CGIs look pretty. They have no effect on monitoring and are completely optional.
<host_name> | This is a short name of the host associated with the service, as specified in the service definition. |
<svc_description> | This is a description of the service, as specified in the service definition. |
<notes_url> | This is an optional URL that can be used to provide more information about the service. If you specify an URL, you will see a link that says "Notes About This Service" in the extended information CGI (when you are viewing information about the specified service). Any valid URL can be used. If you plan on using relative paths, the base path will the the same as what is used to access the CGIs (i.e. /cgi-bin/nagios/). This can be very useful if you want to make detailed information on the service, emergency contact methods, etc available to other support staff. |
<icon_image> | The name of a GIF, PNG, or JPG image that should be associated with this service. This image will be displayed in the status and extended information CGIs. The image will look best if it is 40x40 pixels in size. Images for hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/nagios/share/images/logos). |
<alt_tag> | An optional string that is used in the ALT tag of the image specified by the <icon_image> argument. The ALT tag is used in the status CGI. |