1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>13.10. printer.cfg</title>
<link rel="stylesheet" href="../stylesheets/icinga-docs.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<meta name="keywords" content="Supervision, Icinga, Nagios, Linux">
<link rel="home" href="index.html" title="Icinga Version 1.14 Documentation">
<link rel="up" href="ch13.html" title="Chapter 13. Icinga Samples">
<link rel="prev" href="sample-notifications.html" title="13.9. notifications.cfg">
<link rel="next" href="sample-switch.html" title="13.11. switch.cfg">
<script src="../js/jquery-min.js" type="text/javascript"></script><script src="../js/icinga-docs.js" type="text/javascript"></script>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<CENTER><IMG src="../images/logofullsize.png" border="0" alt="Icinga" title="Icinga"></CENTER>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">13.10. printer.cfg</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="sample-notifications.html">Prev</a> </td>
<th width="60%" align="center">Chapter 13. Icinga Samples</th>
<td width="20%" align="right"> <a accesskey="n" href="sample-switch.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="13.10. printer.cfg">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="sample-printer"></a>13.10. <a name="sample_printer"></a>printer.cfg</h2></div></div></div>
<pre class="programlisting">
###############################################################################
# PRINTER.CFG - SAMPLE CONFIG FILE FOR MONITORING A NETWORK PRINTER
#
# NOTES: This config file assumes that you are using the sample configuration
# files that get installed with the Icinga quickstart guide.
#
###############################################################################
###############################################################################
###############################################################################
#
# HOST DEFINITIONS
#
###############################################################################
###############################################################################
# Define a host for the printer we'll be monitoring
# Change the host_name, alias, and address to fit your situation
define host{
use generic-printer ; Inherit default values from a template
host_name hplj2605dn ; The name we're giving to this printer
alias HP LaserJet 2605dn ; A longer name associated with the printer
address 192.168.1.30 ; IP address of the printer
hostgroups network-printers ; Host groups this printer is associated with
}
###############################################################################
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
###############################################################################
# A hostgroup for network printers
define hostgroup{
hostgroup_name network-printers ; The name of the hostgroup
alias Network Printers ; Long name of the group
}
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
# Create a service for monitoring the status of the printer
# Change the host_name to match the name of the host you defined above
# If the printer has an SNMP community string other than "public", change the check_command directive to reflect that
define service{
use generic-service ; Inherit values from a template
host_name hplj2605dn ; The name of the host the service is associated with
service_description Printer Status ; The service description
check_command check_hpjd!-C public ; The command used to monitor the service
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
}
# Create a service for "pinging" the printer occassionally. Useful for monitoring RTA, packet loss, etc.
define service{
use generic-service
host_name hplj2605dn
service_description PING
check_command check_ping!3000.0,80%!5000.0,100%
normal_check_interval 10
retry_check_interval 1
}
</pre>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="sample-notifications.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch13.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="sample-switch.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">13.9. notifications.cfg </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> 13.11. switch.cfg</td>
</tr>
</table>
</div>
<P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P>
</body>
</html>
|