Would it be possible in a future release to support something like a $HOSTn$ macro? I'm running into some larger configs where this would be very useful.
I've got hundreds of CCTV cameras with serial PTZ-control ports and
analog video outputs. Their serial ports are connected to various
terminal servers scattered around a rather large network. Their video
outputs are connected to separate video encoders.
I have standard hosts definitions for the terminal servers and encoders.
I have bogus host definitions for the cameras (with check_command set to
check_none). The camera hosts are in a hostgroup are so I can provide
consolidated reports to camera technicians.
I currently have a whole slew of service definitions for the cameras
that actually check the serial ports and video inputs on the real
devices the camera is connected to. I'd love to be able to do something
like this instead:
> define host{
> host_name cam-844
> hostgroups CAM
> host_data ts-23,12,enc-45,3 # terminal-server host, port,
> encoder host, port
> use cam-host
> }
> define command{
> command_name check_cam_control
> command_line $USER1$/local/check_cam_control -H $HOST1$ -P
> $HOST2$
> }
> define command{
> command_name check_cam_video
> command_line $USER1$/local/check_cam_video -H $HOST3$ -P
> $HOST4$
> }
> define service{
> hostgroup_name CAM
> service_description CONTROL
> servicegroups CAM-CONTROL
> check_command check_cam_control
> use cam-service
> }
> define servicedependency{
> host_name $HOST1$
> service_description PING
> dependent_hostgroup_name CAM
> dependent_service_description CONTROL
> execution_failure_criteria w,u,c,p
> notification_failure_criteria w,u,c,p
> }
> define service{
> hostgroup_name CAM
> service_description VIDEO
> servicegroups CAM-VIDEO
> check_command check_cam_video
> use cam-service
> }
> define servicedependency{
> host_name $HOST3$
> service_description PING
> dependent_hostgroup_name CAM
> dependent_service_description VIDEO
> execution_failure_criteria w,u,c,p
> notification_failure_criteria w,u,c,p
> }
Three ideas here:
1: add CSV "host_data" attribute to "host" definitions.
2: make "host_data" pieces available in commands via $HOSTn$
3: make $HOSTn$ vars available in related object definitions
Maybe a pipe dream. Worth throwing out though. Maybe I'll look at a
hack where I pack the info into the $HOSTNOTES$ extended attributes....
Paul
--
Paul Dugas <[EMAIL PROTECTED]>
Dugas Enterprises, LLC
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Nagios-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null
