Cacti and Nagios integration dashboard

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

perldork
Cacti User
Posts: 69
Joined: Fri Nov 05, 2004 9:06 am
Contact:

Post by perldork »

I wrote and maintain this project, Smux, I am telling you the class is a part of the distribution.

http://cacinda.sf.net/

I certainly believe there is a Net_SNMP class, which means I may have to rethink my naming convention to make sure files under Cacinda do not clash with non-Cacinda classes.
[url=http://www.semintelligent.com/blog]Max Schubert a.k.a perldork[/url]
[url=http://wwd-hosting.net/ensim/]Ensim scripts and utilities (GPL)[/url] - [url=http://nmap-scanner.sf.net]Perform nmap scans with perl (GPL)[/url]
[url=http://lmf.sf.net]Perl-based log monitoring framework(GPL)[/url]
perldork
Cacti User
Posts: 69
Joined: Fri Nov 05, 2004 9:06 am
Contact:

Post by perldork »

Ok, you are getting the error

Failed opening 'templates/Unix_Net_SNMP.php'

this is a bug in my code.

Try replacing the code for output_page($page) in index.php with this

Code: Select all

function output_page($page) {

    if (! isset($_REQUEST['draw'])) {
        include_once(dirname(__FILE__) . "/templates/header.php");
    }
    
    include_once(dirname(__FILE__) . "/templates/{$page}.php");

    if (! isset($_REQUEST['draw'])) {
        include_once(dirname(__FILE__) . "/templates/footer.php");
    }

}

and let me know if you get a different result, you should.
[url=http://www.semintelligent.com/blog]Max Schubert a.k.a perldork[/url]
[url=http://wwd-hosting.net/ensim/]Ensim scripts and utilities (GPL)[/url] - [url=http://nmap-scanner.sf.net]Perform nmap scans with perl (GPL)[/url]
[url=http://lmf.sf.net]Perl-based log monitoring framework(GPL)[/url]
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

Result:

Code: Select all

Warning: include_once(/home/sysmon/public_html/cacinda/templates/Unix_Net_SNMP.php) [function.include-once]: failed to open stream: No such file or directory in /home/sysmon/public_html/cacinda/index.php on line 12

Warning: include_once() [function.include]: Failed opening '/home/sysmon/public_html/cacinda/templates/Unix_Net_SNMP.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sysmon/public_html/cacinda/index.php on line 12
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

Smux wrote:Result:

Code: Select all

Warning: include_once(/home/sysmon/public_html/cacinda/templates/Unix_Net_SNMP.php) [function.include-once]: failed to open stream: No such file or directory in /home/sysmon/public_html/cacinda/index.php on line 12

Warning: include_once() [function.include]: Failed opening '/home/sysmon/public_html/cacinda/templates/Unix_Net_SNMP.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sysmon/public_html/cacinda/index.php on line 12
Oh, there`s a error in name in your code...

sysmon@sysmon.forbrazil.com.br [~/www/cacinda/templates]# ls
./ footer.php* unix_net_snmp.php* windows_ms_snmp.php*
../ header.php* unix_sysedge.php*
cisco_ios.php* no_such_class.php* welcome.php*
perldork
Cacti User
Posts: 69
Joined: Fri Nov 05, 2004 9:06 am
Contact:

Post by perldork »

One more change:

Find the the code

Code: Select all

    output_page(get_class($snmp));
in index.php and replace it with

Code: Select all

    output_page(strtolower(get_class($snmp)));
[url=http://www.semintelligent.com/blog]Max Schubert a.k.a perldork[/url]
[url=http://wwd-hosting.net/ensim/]Ensim scripts and utilities (GPL)[/url] - [url=http://nmap-scanner.sf.net]Perform nmap scans with perl (GPL)[/url]
[url=http://lmf.sf.net]Perl-based log monitoring framework(GPL)[/url]
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

Holy shit!! There is OK now.

Thank you very much perldork!!
perldork
Cacti User
Posts: 69
Joined: Fri Nov 05, 2004 9:06 am
Contact:

Post by perldork »

Smux wrote:Holy shit!! There is OK now.

Thank you very much perldork!!
Hi, you are welcome, changes checked into CVS for the next release :).

Code: Select all

Fatal error: Call to undefined function imagettfbbox() in /usr/local/lib/php/Image/Canvas/GD.php on line 1240
Looks like you are missing freetype or GD support in your PHP installation.
[url=http://www.semintelligent.com/blog]Max Schubert a.k.a perldork[/url]
[url=http://wwd-hosting.net/ensim/]Ensim scripts and utilities (GPL)[/url] - [url=http://nmap-scanner.sf.net]Perform nmap scans with perl (GPL)[/url]
[url=http://lmf.sf.net]Perl-based log monitoring framework(GPL)[/url]
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

Yes, Im trying to install, see: http://cprf03.forbrazil.com.br/teste.php but i dont know why my compilation dont active this extension module.

Edit: i have post the wrong link heh. I solve my problem!!

Perldork,

I found a new error:

Code: Select all

 Warning: preg_replace() [function.preg-replace]: Empty regular expression in /home/sysmon/public_html/cacinda/inc/functions.php on line 138
I dont know solve this, my internet already is very unstable (sucks). Later I come back to work in this.

Thank you very much.
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Hey perldork

Post by Smux »

How to work $NAGIOS_HOST_MATCH and $NAGIOS_HOST_REPLACE ??
perldork
Cacti User
Posts: 69
Joined: Fri Nov 05, 2004 9:06 am
Contact:

Post by perldork »

Smux,

1) Do your Nagios host names equal the names you use in Cacti? If they do, then you do not need to put anything in either of those variables.

I have just added code to index.php and checked it into CVS that will make sure that if you do not define them you do not see PHP warnings about empty regular expressions, thanks for reporting that.
[url=http://www.semintelligent.com/blog]Max Schubert a.k.a perldork[/url]
[url=http://wwd-hosting.net/ensim/]Ensim scripts and utilities (GPL)[/url] - [url=http://nmap-scanner.sf.net]Perform nmap scans with perl (GPL)[/url]
[url=http://lmf.sf.net]Perl-based log monitoring framework(GPL)[/url]
sterpstra
Posts: 45
Joined: Tue May 27, 2008 11:48 pm
Location: So Cal
Contact:

Cacti->Nagios Integration

Post by sterpstra »

So I'm several months behind the curve but I wanted to see if this plug-in was available somewhere. Couldn't find on SourceForge or the web site.

This is an AWESOME add-on. I've got several hundred servers, Filers, Routers, switches.. blah blah that need some pretty pictures to go along with the monotonous tone of Nagios (although very powerful :)

Thanks,

-st
perldork
Cacti User
Posts: 69
Joined: Fri Nov 05, 2004 9:06 am
Contact:

Re: Cacti->Nagios Integration

Post by perldork »

Hi,
sterpstra wrote:So I'm several months behind the curve but I wanted to see if this plug-in was available somewhere. Couldn't find on SourceForge or the web site.

This is an AWESOME add-on. I've got several hundred servers, Filers, Routers, switches.. blah blah that need some pretty pictures to go along with the monotonous tone of Nagios (although very powerful :)

Thanks,

-st
I have been reworking the initial code for the add-on, you can currently check it out using anonymous CVS from the sourceforge.net site. I really want this to be a Cacti plugin but still haven't had time to do that .. sorry.

I will create a .tgz release this week or next week for the current code base.

My next goal with the code is to make generating graphical widgets (graph, pie, etc) easier as a code user.
[url=http://www.semintelligent.com/blog]Max Schubert a.k.a perldork[/url]
[url=http://wwd-hosting.net/ensim/]Ensim scripts and utilities (GPL)[/url] - [url=http://nmap-scanner.sf.net]Perform nmap scans with perl (GPL)[/url]
[url=http://lmf.sf.net]Perl-based log monitoring framework(GPL)[/url]
sterpstra
Posts: 45
Joined: Tue May 27, 2008 11:48 pm
Location: So Cal
Contact:

Re: Cacti->Nagios Integration

Post by sterpstra »

I have been reworking the initial code for the add-on, you can currently check it out using anonymous CVS from the sourceforge.net site. I really want this to be a Cacti plugin but still haven't had time to do that .. sorry.

I will create a .tgz release this week or next week for the current code base.

My next goal with the code is to make generating graphical widgets (graph, pie, etc) easier as a code user.
Thanks for the update. I'll see how far I can get with the CVS stuff. This is great stuff...
jason_prouty
Posts: 1
Joined: Sat Sep 13, 2008 1:45 pm

DB.php

Post by jason_prouty »

HP Warning: require_once(DB.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /var/www/html/cacinda/inc/functions.php on line 4
[Sat Sep 13 18:47:28 2008] [error] [client 10.16.242.20] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'DB.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/cacinda/inc/functions.php on line 4
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Post by JJX »

Is this project still alive?!
cacti rulez!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests