File: cgiincludes.html

package info (click to toggle)
icinga 1.14.2%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 49,264 kB
  • sloc: ansic: 108,564; sql: 9,656; sh: 4,945; perl: 3,439; makefile: 1,213; php: 581; xml: 104
file content (112 lines) | stat: -rw-r--r-- 6,539 bytes parent folder | download
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>7.24. Custom CGI Headers and Footers (Classic UI)</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="ch07.html" title="Chapter 7. Advanced Topics">
<link rel="prev" href="checkscheduling.html" title="7.23. Service and Host Check Scheduling">
<link rel="next" href="modified_attr.html" title="7.25. Modified attributes">
<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">7.24. Custom CGI Headers and Footers (Classic UI)</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="checkscheduling.html">Prev</a> </td>
<th width="60%" align="center">Chapter 7. Advanced Topics</th>
<td width="20%" align="right"> <a accesskey="n" href="modified_attr.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="7.24. Custom CGI Headers and Footers (Classic UI)">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="cgiincludes"></a>7.24. <a name="cgi_includes"></a>Custom CGI Headers and Footers (Classic UI)</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section">7.24.1. <a href="cgiincludes.html#introduction_cgiincludes">Introduction</a></span></dt>
<dt><span class="section">7.24.2. <a href="cgiincludes.html#howitworks">How Does It Work?</a></span></dt>
</dl></div>
  

  <div class="section" title="7.24.1. Introduction">
<div class="titlepage"><div><div><h3 class="title">
<a name="introduction_cgiincludes"></a>7.24.1. Introduction</h3></div></div></div>
    

    <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="6.1. Icinga Classic UI: Information On The Modules">Classic UI modules</a> (CGIs). 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 Classic UI module's 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 Classic UI module 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 Classic UI module environment as the main Icinga Classic UI module, so your files can parse the
    query information, authenticated user information, etc. to produce appropriate output.</p>
  </div>

  <div class="section" title="7.24.2. How Does It Work?">
<div class="titlepage"><div><div><h3 class="title">
<a name="howitworks"></a>7.24.2. How Does It Work?</h3></div></div></div>
    

    <p>You can include custom headers and footers in the output of the Classic UI modules 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 Classic UI module 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 Classic UI
        modules.</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 Classic UI module without
        the .cgi extension. For example, the header and footer files for the <a class="link" href="cgis.html#cgis-summary_cgi">alert summary Classic UI
        module</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="idm140381623697168"></a>
  </div>
</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="ch07.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="modified_attr.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">7.23. 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"> 7.25. Modified attributes</td>
</tr>
</table>
</div>
<P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P>
</body>
</html>