Add new comment

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by chillifire (registered user) on Fri, 2008-02-29 20:41.

I have munin and monit installed on my ISPConfi Servers and also Prelude/Prewikka - follwoing the HowTos on this site. Now, Prewikka gives web access to Prelude, OSSEC and Snort, but Munin, ISPConfig and Monit are still separate websites. So I thought why not use the generated Munin Overview screen as a linkscreen to all the different programs for all my servers?

As the Munin screens are generated, it is not a question of adjusting simple html. You need to edit /etc/munin/templates/munin-overview.tmpl. You will see some pseudo HTML code with many variables, which are obviously replaced at generation time. We will need to make adjustments in the middle:

 <TMPL_LOOP NAME="DOMAINS">
 <ul>
  <li><span class="domain"><a href="<TMPL_VAR NAME="DOMAIN">/index.html"><TMPL_VAR ESCAPE="HTML" NAME="DOMAIN"></a></span><TMPL_IF NAME="COMPARE"> :: [ <a href="<TMPL_VAR NAME="DOMAIN">/comparison-day.html">day</a> <a href="<TMPL_VAR NAME="DOMAIN">/comparison-week.html">week</a> <a href="<TMPL_VAR NAME="DOMAIN">/comparison-month.html">month</a> <a href="<TMPL_VAR NAME="DOMAIN">/comparison-year.html">year</a> ]</TMPL_IF>
      <ul>
        <TMPL_LOOP NAME="NODES">
        <li><span class="host"><a href="<TMPL_VAR NAME="DOMAIN">/<TMPL_VAR NAME="NODE">.html"><TMPL_VAR ESCAPE="HTML" NAME="NODE"></a></span> ::
        [ <TMPL_LOOP NAME="CATEGORIES"><a <TMPL_IF NAME="STATE_WARNING">class="warn"</TMPL_IF> <TMPL_IF NAME="STATE_CRITICAL">class="crit"</TMPL_IF> href="<TMPL_VAR NAME="DOMAIN">/<TMPL_VAR NAME="NODE">.html#<TMPL_VAR NAME="NAME">"><TMPL_VAR ESCAPE="HTML" NAME="NAME"></a> </TMPL_LOOP> <a target="_blank" href="https://<TMPL_VAR NAME="NODE">:2812/">Monit</a> <a target="_blank" href="https://<TMPL_VAR NAME="NODE">:81/">ISPConfig</a> ]</li>
        </TMPL_LOOP>
        <li><span class="host"><a target="_blank" href="https://prelude.<TMPL_VAR NAME="DOMAIN">">Prewikka Console</a></li>
 </ul>
   </li>
 </ul>
 </TMPL_LOOP>

The code in bold will generate the link to Monit and ISPConfig respective. The code in bold and italic will generate the link to prewikka/prelude, but assumes you created a subdomain (or a co-domain in ISPConfig) of the name prelude.yourdomain.com. The 'yourdomain.com' is replaced at runtime with the real name - in my case a .net domain actually - not .com.

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.