How to define extended info

WAS THIS PAGE HELPFUL? Leave Feedback

Overview

This page reviews the configuration of extended info templates. Extended host and service information entries are basically used to make the output from the status, statusmap, statuswrl, and extinfo CGIs look good. They have no effect on monitoring and are completely optional. For example, under Generating Extended Host Info Templates from Logos for the Nagios GUI's below, the figure shows a server icon next to each Host. This icon image is designated in the Extended Host Info Template as server.png in the Status Map Image property field.

Steps
Defining template properties
  1. Select Hosts from the Configuration page.
  2. Expand the Host extended info drop-down menu.
  3. Select New.
  4. In the Extended Host Info Template Properties screen described in the table below.
  5. Select Add to add the new extended host info template.
  6. You will be prompted that the template has been saved. Select Continue.
    To copy an existing template select Copy from the Extended Host Info Template options. This will let you name and edit the copied properties for a new template. To modify or delete a template select Modify. You will then be able to edit and Save a modified template. Select Delete to remove a selected template, Rename to change the name, or Cancel to exit out without any changes.
    Extended Host Info Template Name [Required] Name of the Extended Host Info Template.
    Notes [Optional] Used to define a string of notes pertaining to the host. If you specify a note here, you will see it in the extended information CGI (when you are viewing information about the specified host).
    Notes URL [Optional] This option is used to define a URL that can be used to provide more information about the Host. If you specify a 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 be the same as what is used to access the CGIs (e.g., /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. Also, as this is a template, you may use macros $HOSTNAME$ and $HOSTADDRESS$ in the URL.
    Action URL [Optional] This directive is used to define an optional URL that can be used to provide more actions to be performed on the host. If you specify a URL, you will see a link that says Extra Host Actions in the extended information CGI (when your are viewing information about the specified host). Any valid URL can be used. If you plan on using relative paths, the base path will be the same as what is used to access the CGIs (e.g., /cgi-bin/nagios/).
    Icon Image [Optional] This variable is used to define 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 (e.g., /usr/local/nagios/share/images/logos).
    Icon Image Alt [Optional] This variable is used to define 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, extended information and statusmap CGIs.
    VRML Image [Optional] This variable is used to define 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 weird. Images for Hosts are assumed to be in the logos subdirectory in your HTML images directory (., /usr/local/nagios/share/images/logos).
    Statusmap Image [Optional] This variable is used to define the name of an image that should be associated with this Host in the statusmap CGI. You can specify a JPEG, PNG, and GIF image if you want, although I would strongly suggest using a GD2 format image, as other image formats will result in a lot of wasted CPU time when the statusmap image is generated. 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 (e.g., /usr/local/nagios/share/images/logos).
    2d Coords [Optional] This variable is used to define 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.
    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.

    3d Coords [Optional] This variable is used to set 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.
Apply an extended host info template to a host Profile

You can apply an extended host info template within a host profile which will add the template properties to all hosts associated with the host profile.

  1. Select Profiles from the Configuration page.
  2. Expand the Host Profiles option.
  3. Select Modify, (for new host profiles follow the same procedure).
  4. Select the Host Profile to add an extended host info template.
  5. Select the drop-down box for Extended Host Info Template and select an existing template.
  6. Select Save.
  7. Next you can assign hosts to use this host profile with the extended host info template by selecting the Assign Hosts tab. After adding the hosts make sure you Save your changes. As a last step make sure you select the Apply tab, check the Apply Detail to Hosts and select Apply.
    Assigning a host profile directly from within the hosts option versus the host profile creates the association so that the host can be managed from the host profile, but there is no other effect on the host configuration. In other words, if you are in hosts and adding or changing a host profile the host profile will update ONLY the Service properties and not the host detail (including extended host info template).
    Tip: Work within the host profile when possible.
Apply an extended host info template to a host

You can also add the template properties directly to an individual host.

  1. Select Hosts from the Configuration page.
  2. Select a host to add the an extended host info template.
  3. Select the drop-down box for Extended Host Info Template and select an existing template.
  4. Select Save.
Generate extended hosy info templates from logos for the Nagios GUI's

Use the logos in /usr/local/groundwork/nagios/share/images/logos (you can place your own logos here also if you wish) and run /usr/local/groundwork/tools/profile_scripts/gen_hostextinfo.pl to generate extended host info templates. You will need three types of files; gif, png, and gd2, for complete templates. The file names should be identical (except for the extensions). The file names should also be descriptive of the object to which they will be assigned.

gd is a graphics library. It allows your code to quickly draw images complete with lines, arcs, text, multiple colors, cut and paste from other images, and flood fills, and write out the result as a png or jpeg file. There is a useful tool to create gd2 files from png files: /usr/local/groundwork/common/bin/pngtogd2.

After running gen_hostextinfo.pl you will find the templates ready to import under Configuration, Profiles, Profile Importer.

Figure: Extended Host Info Template - Status Map Image

Labels

configuration configuration Delete
monarch monarch Delete
extended extended Delete
info info Delete
templates templates Delete
cgi cgi Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.