File: cgiincludes.html

package info (click to toggle)
icinga 1.0.2-2%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 33,952 kB
  • ctags: 13,294
  • sloc: xml: 154,821; ansic: 99,198; sh: 14,585; sql: 5,852; php: 5,126; perl: 2,838; makefile: 1,268
file content (113 lines) | stat: -rw-r--r-- 5,474 bytes parent folder | download | duplicates (2)
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Custom CGI Headers and Footers</title>
<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.0.2 Documentation">
<link rel="up" href="ch06.html" title="Chapter 6. Advanced Topics">
<link rel="prev" href="checkscheduling.html" title="Service and Host Check Scheduling">
<link rel="next" href="objectinheritance.html" title="Object Inheritance">
</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">Custom CGI Headers and
  Footers</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="checkscheduling.html">Prev</a> </td>
<th width="60%" align="center">Chapter 6. Advanced Topics</th>
<td width="20%" align="right"> <a accesskey="n" href="objectinheritance.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="Custom CGI Headers and Footers">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="cgiincludes"></a><a name="cgi_includes"></a>Custom CGI Headers and
  Footers</h2></div></div></div>
  

  <p><span class="bold"><strong>Introduction</strong></span></p>

  <p>If you're doing custom installs of Icinga for clients, you may
  want to have a custom header and/or footer displayed in the output of the
  <a class="link" href="cgis.html" title="Information On The CGIs">CGIs</a>. This is particularly useful for displaying
  support contact information, etc. to the end user.</p>

  <p>It is important to note that, unless they are executable, custom
  header and footer files are not pre-processed in any way before they are
  displayed. The contents of the header and footer include files are simply
  read and displayed in the CGI output. That means they can only contain
  information a web browser can understand (HTML, JavaScript, etc.).</p>

  <p>If the custom header and footer files are executable, then the files
  are executed and their output returned to the user, so they should output
  valid HTML. Using this you can run your own custom designed CGI to insert
  data into the Icinga display. This has been used to insert graphs from
  rrdtool using ddraw and command menus into the Icinga display pane. The
  execuable customer header and footer files are run with the same CGI
  environment as the main Icinga CGI, so your files can parse the query
  information, authenticated user information, etc. to produce appropriate
  output.</p>

  <p><span class="bold"><strong>How Does It Work?</strong></span></p>

  <p>You can include custom headers and footers in the output of the CGIs
  by dropping some appropriately named HTML files in the
  <span class="emphasis"><em>ssi/</em></span> subdirectory of the Icinga HTML directory
  (i.e. <span class="emphasis"><em>/usr/local/icinga/share/ssi</em></span>).</p>

  <p>Custom headers are included immediately after the &lt;BODY&gt;&gt; tag
  in the CGI output, while custom footers are included immediately before the
  closing &lt;/BODY&gt; tag.</p>

  <p>There are two types of customer headers and footers:</p>

  <div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
      <p>Global headers/footers. These files should be named
      <span class="emphasis"><em>common-header.ssi</em></span> and
      <span class="emphasis"><em>common-footer.ssi</em></span>, respectively. If these files
      exist, they will be included in the output of all CGIs.</p>
    </li>
<li class="listitem">
      <p>CGI-specific headers/footers. These files should be named in the
      format <span class="emphasis"><em>CGINAME-header.ssi</em></span> and
      <span class="emphasis"><em>CGINAME-footer.ssi</em></span>, where
      <span class="emphasis"><em>CGINAME</em></span> is the physical name of the CGI without the
      .cgi extension. For example, the header and footer files for the <a class="link" href="cgis.html#cgis-summary_cgi">alert summary CGI</a> (summary.cgi) would
      be named <span class="emphasis"><em>summary-header.ssi</em></span> and
      <span class="emphasis"><em>summary-footer.ssi</em></span>, respectively.</p>
    </li>
</ul></div>

  <p>You are not required to use any custom headers or footers. You can use
  only a global header if you wish. You can use only CGI-specific headers and
  a global footer if you wish. Whatever you want. Really.</p>

  <a class="indexterm" name="id2001079"></a>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="checkscheduling.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch06.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="objectinheritance.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Service and Host Check Scheduling </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> Object Inheritance</td>
</tr>
</table>
</div>
<P class="copyright">© 2009-2010 Icinga Development Team, http://www.icinga.org</P>
</body>
</html>