October 2008
Intermediate to advanced
720 pages
16h 7m
English
Starting from Nagios 3.0, you can specify your own macros in host, service, and contact definitions. These macros, called custom macros in Nagios jargon, are treated like normal standard macros, and their names begin with an underscore to make them more easily identifiable:
define host {
host_name linux01
...
_NSCLIENT_PORT 12489
_ASSETID 734287
}
define service {
host_name linux01
service_description HTTP
...
_HTTP_PORT 8080
}
define contact {
contact_name wob
...
_DEPARTMENT 41ZBV
}They are addressed with a prefixed object type:
$_HOSTNSCLIENT_PORT$ $_HOSTASSETID$ $_SERVICEHTTP_PORT$ $_CONTACTDEPARTMENT$
The macro again starts with an underscore, but the underscore supplied in the definition is omitted. This ...
Read now
Unlock full access