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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>9.5. Installation of the Icinga Reporting with JasperReports Server</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="ch09.html" title="Chapter 9. Integration With Other Software">
<link rel="prev" href="int-mklivestatus.html" title="9.4. MKLiveStatus Integration">
<link rel="next" href="ch10.html" title="Chapter 10. Additional software">
<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">9.5. Installation of the Icinga Reporting with JasperReports Server</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="int-mklivestatus.html">Prev</a> </td>
<th width="60%" align="center">Chapter 9. Integration With Other Software</th>
<td width="20%" align="right"> <a accesskey="n" href="ch10.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" title="9.5. Installation of the Icinga Reporting with JasperReports Server">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="reporting"></a>9.5. Installation of the Icinga Reporting with JasperReports Server</h2></div></div></div>
<div class="toc"><dl>
<dt><span class="section">9.5.1. <a href="reporting.html#introduction">Introduction</a></span></dt>
<dt><span class="section">9.5.2. <a href="reporting.html#officialdocs">Official Docs</a></span></dt>
<dt><span class="section">9.5.3. <a href="reporting.html#requirements">Requirements</a></span></dt>
<dt><span class="section">9.5.4. <a href="reporting.html#icingareporting">Icinga Reporting</a></span></dt>
<dt><span class="section">9.5.5. <a href="reporting.html#configuration">Configuration</a></span></dt>
<dt><span class="section">9.5.6. <a href="reporting.html#reports">Reports</a></span></dt>
<dt><span class="section">9.5.7. <a href="reporting.html#errors">Errors</a></span></dt>
</dl></div>
<div class="section" title="9.5.1. Introduction">
<div class="titlepage"><div><div><h3 class="title">
<a name="introduction"></a>9.5.1. Introduction</h3></div></div></div>
<p>The Icinga Reporting is based on the IDOUtils backend and just like the Icinga Core, it will support all major database
platforms.</p>
<p>Here we'll give you some instructions on how to install the Icinga Reporting with JasperReports Server.</p>
</div>
<div class="section" title="9.5.2. Official Docs">
<div class="titlepage"><div><div><h3 class="title">
<a name="officialdocs"></a>9.5.2. Official Docs</h3></div></div></div>
<p>For more information, please refer to <a class="link" href="http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperServer%205.0.0/JasperReports-Server-CP-Install-Guide.pdf" target="_top">http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperServer%205.0.0/JasperReports-Server-CP-Install-Guide.pdf</a>
or <a class="link" href="http://jasperforge.org/espdocs/espbrowse.php?id=86&type=folder&group_id=112&parent=86" target="_top">http://jasperforge.org/espdocs/espbrowse.php?id=86&type=folder&group_id=112&parent=86</a></p>
</div>
<div class="section" title="9.5.3. Requirements">
<div class="titlepage"><div><div><h3 class="title">
<a name="requirements"></a>9.5.3. Requirements</h3></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<p>Icinga and IDOUtils</p>
<p>Installed via <a class="link" href="quickstart-idoutils.html" title="2.6. Icinga with IDOUtils Quickstart">sources</a> or <a class="link" href="icinga_packages.html#icinga-packages">packages.</a></p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>Starting with Icinga 1.8 there is a database function providing all needed sla-informations. This function needs to
be imported into your existing IDOUtils database additional to the Icinga Reporting package.</p>
</td></tr>
</table></div>
<p>MySQL</p>
<pre class="screen">#> /usr/bin/mysql icinga < icinga-reports-1.10.0/db/icinga/mysql/availability.sql</pre>
<p>Please make sure your database user (here icinga@localhost) has the correct GRANT for EXECUTE. </p>
<pre class="screen">#> /usr/bin/mysql -u root -p <password> icinga
mysql> GRANT EXECUTE ON icinga.* TO 'icinga'@'localhost' ;
quit</pre>
</li></ul></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p>Apache Tomcat</p>
<p>Only if you don't want to use the bundled one from JasperServer</p>
<pre class="screen"> #> apt-get install tomcat6</pre>
</li>
<li class="listitem">
<p>PostgreSQL</p>
<p>Only if you don't want to use the bundled one from JasperServer. PostgreSQL is required for JasperServer's internal
storage.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>JasperServer changed their backend from MySQL to PostgreSQL in 4.2.1! <a class="link" href="http://jasperforge.org/plugins/espnews/browse.php?group_id=112&news_id=292" target="_top">Source</a></p>
</td></tr>
</table></div>
</li>
<li class="listitem">
<p>JasperReports Server</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>The new JasperReports Server 5.0.0 is only supported starting with Icinga Reporting 1.9. If you want to use an older version of the
Icinga Reporting- package, please use at least JasperReports Server 4.5.0.</p>
</td></tr>
</table></div>
<p>Depending on your architecture (<code class="code">uname -a</code>), fetch the appropriate installer - below is x64</p>
<pre class="screen"> $> wget http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperServer%205.0.0/jasperreports-server-cp-5.0.0-linux-x64-installer.run
$> chmod +x jasperreports-server-cp-5.0.0-linux-x64-installer.run
$> sudo ./jasperreports-server-cp-5.0.0-linux-x64-installer.run</pre>
<div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
<p>Agree to license</p>
</li>
<li class="listitem">
<p>select bundled tomcat</p>
</li>
<li class="listitem">
<p>select bundled postgresql</p>
<div class="itemizedlist"><ul class="itemizedlist" type="square"><li class="listitem">
<p>select a different postgresql port, like 5433, not to interfere with existing setups</p>
</li></ul></div>
</li>
<li class="listitem">
<p>install sample reports and ireports</p>
</li>
</ul></div>
<p>The installer will automatically create the needed database, create the schema and install samples.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../images/note.png"></td>
<th align="left">Note</th>
</tr>
<tr><td align="left" valign="top">
<p>The default installation location will be /opt/jasperreports-server-cp-5.0.0/, so make sure to work on the correct
JasperReports Server if you are doing an upgarde!</p>
</td></tr>
</table></div>
<p><span class="emphasis"><em>Start</em></span></p>
<pre class="screen"> #> cd /opt/jasperreports-server-cp-5.0.0/
#> ./ctlscript.sh start</pre>
<p>For individual components</p>
<pre class="screen"> #> ./ctlscript.sh postgresql start|stop
#> ./ctlscript.sh tomcat start|stop</pre>
</li>
</ul></div>
</div>
<div class="section" title="9.5.4. Icinga Reporting">
<div class="titlepage"><div><div><h3 class="title">
<a name="icingareporting"></a>9.5.4. Icinga Reporting</h3></div></div></div>
<p>As from Icinga 1.6 on, the package provides configure and make scripts.</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p>Sources</p>
<p>Download from sourceforge and extract. If you have an issue which might be solved in the developer version then get the latest
developer snapshot from git </p>
<pre class="screen"> $> wget https://github.com/Icinga/icinga-reports/releases/download/v1.10.0/icinga-reports-1.10.0.tar.gz \
tar xzf icinga-reports-1.10.0.tar.gz; \
cd icinga-reports-1.10.0</pre>
<p>or </p>
<pre class="screen"> $> git clone git://git.icinga.org/icinga-reports.git ; \
cd icinga-reports</pre>
<p>If a developer told you to use his/her branch, check that out with</p>
<pre class="screen"> $> git branch localbranch origin/devhead/devbranch
$> git checkout localbranch
$> git log</pre>
</li>
<li class="listitem">
<p>Configure</p>
<p>If you did not install the JasperReports Server into the default prefix before, you need to tell configure the location. </p>
<pre class="screen"> $> ./configure --with-jasper-server=/opt/jasperreports-server-cp-5.0.0</pre>
</li>
<li class="listitem">
<p>Make</p>
<p>Invoke 'make' without params to get a full list of available options.</p>
<div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
<p>MySQL Connector</p>
<p>JasperReports Server natively ships with the PostgreSQL Connector, but if you require MySQL, the Icinga Reporting package
provides one for install.</p>
<pre class="screen"> #> make install-mysql-connector</pre>
<p>Restart the Tomcat server</p>
<pre class="screen"> #> cd /opt/jasperreports-server-cp-5.0.0
#> ./ctlscript.sh stop tomcat
#> ./ctlscript.sh start tomcat</pre>
</li>
<li class="listitem">
<p>Install</p>
<p>JasperReports Server must be running!</p>
<pre class="screen"> #> make install</pre>
<p>Restart the Tomcat server</p>
<pre class="screen"> #> cd /opt/jasperreports-server-cp-5.0.0
#> ./ctlscript.sh stop tomcat
#> ./ctlscript.sh start tomcat</pre>
</li>
</ul></div>
</li>
</ul></div>
</div>
<div class="section" title="9.5.5. Configuration">
<div class="titlepage"><div><div><h3 class="title">
<a name="configuration"></a>9.5.5. Configuration</h3></div></div></div>
<p>Open the webinterface, default credentials are jasperadmin:jasperadmin</p>
<p><code class="uri">http://127.0.0.1:8080/jasperserver</code></p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<p>IDO</p>
<p>Go to <code class="uri">/root/Icinga/datasource</code> (be sure that Refine contains "changed by anyone").</p>
<div class="figure">
<a name="idm140381622719984"></a><p class="title"><b>Figure 9.1. Icinga reporting datasource IDO</b></p>
<div class="figure-contents">
<div class="screenshot">
<div class="mediaobject"><img src="../images/icinga-reporting-datasource-ido_1.8.png" alt="Icinga reporting datasource IDO"></div>
</div>
</div>
</div>
<br class="figure-break">
<div class="itemizedlist"><ul class="itemizedlist" type="circle">
<li class="listitem">
<p>edit the existing datasource and configure your values. MySQL driver: com.mysql.jdbc.Driver MySQL URL:
jdbc:mysql://localhost:3306/icinga</p>
<div class="figure">
<a name="idm140381622715632"></a><p class="title"><b>Figure 9.2. Icinga reporting datasource ido mysql</b></p>
<div class="figure-contents">
<div class="screenshot">
<div class="mediaobject"><img src="../images/icinga-reporting-datasource-ido-mysql_1.8.png" alt="Icinga reporting datasource ido mysql"></div>
</div>
</div>
</div>
<br class="figure-break">
</li>
<li class="listitem">
<p>test the configuration and save the connection.</p>
</li>
<li class="listitem">
<p>all reports in our package point to this datasource and should be able to run.</p>
</li>
</ul></div>
</li></ul></div>
</div>
<div class="section" title="9.5.6. Reports">
<div class="titlepage"><div><div><h3 class="title">
<a name="reports"></a>9.5.6. Reports</h3></div></div></div>
<p>Verify that the reports are available and working.</p>
<div class="figure">
<a name="idm140381622708720"></a><p class="title"><b>Figure 9.3. Icinga reporting</b></p>
<div class="figure-contents">
<div class="screenshot">
<div class="mediaobject"><img src="../images/icinga-reporting-overview_1.8.png" alt="Icinga reporting"></div>
</div>
</div>
</div>
<br class="figure-break">
</div>
<div class="section" title="9.5.7. Errors">
<div class="titlepage"><div><div><h3 class="title">
<a name="errors"></a>9.5.7. Errors</h3></div></div></div>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<p>Display Errors</p>
<pre class="screen"> org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.InternalError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable.</pre>
<p>The
tomcat being run as root, trying to access the users x11 display. Allow it for everyone locally.</p>
<pre class="screen"> $> xhost +local:all</pre>
</li>
<li class="listitem">
<p>Generation Errors</p>
<pre class="screen"> org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser</pre>
<p>It
could be Sun AWT trying to connect to X11 classes, but actually it's the PDF generation on a report.</p>
<pre class="screen"> $> sudo apt-get install msttcorefonts
$> cd /opt/jasperreports-server-cp-5.0.0
$> sudo sh ctlscript.sh stop
$> sudo sh ctlscript.sh start</pre>
</li>
</ul></div>
<a class="indexterm" name="idm140381622699632"></a>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="int-mklivestatus.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="ch09.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="ch10.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">9.4. MKLiveStatus Integration </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> Chapter 10. Additional software</td>
</tr>
</table>
</div>
<P class="copyright">© 1999-2009 Ethan Galstad, 2009-2017 Icinga Development Team, https://www.icinga.com</P>
</body>
</html>
|