Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Cacti and Nagios integration dashboard
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti
Author Message
wazoqaz



Joined: 24 May 2006
Posts: 15
Location: md, us

PostPosted: Thu Nov 23, 2006 7:52 am    Post subject: Reply with quote

I too am trying to install. I installed all the pear modules (I had most of them anyway), but I had problems becuase my php installation does not have --with-snmp. It is the same host as my Cacti server so it appears that Cacti does not requeire php with snmp support.

Is there anyway to get around the snmp requirement without a recompile of php?
Back to top
TaTo



Joined: 29 Nov 2006
Posts: 1
Location: Argentina, Buenos Aires

PostPosted: Wed Nov 29, 2006 6:54 pm    Post subject: It's perfect Reply with quote

Dear perldork... your work is a lot for me!!

I've some errors but everything work ok.

PHP Warning: imagettfbbox() [<a href='function.imagettfbbox'>function.imagettfbbox</a>]: Could not find/open font in /usr/share/pear/Image/Canvas/GD.php on line 1308

I solved this problem copying the arial.ttf to cacinda directory where index.php resides.

But i'm in trouble with this:

PHP Warning: Division by zero in /html/cacinda/inc/Windows_MS_SNMP.class.php on line 82

And not getting any RAM available graph

Example


and as you can see cannot see any nagios status info:

Error retrieving Nagios content from http://localhost/nagios/cgi-bin/status.cgi

Is there any way to solve this ??

thanks for all your work!!

Sergio
Back to top
perldork
Cacti User


Joined: 05 Nov 2004
Posts: 68

PostPosted: Mon Dec 04, 2006 7:19 am    Post subject: Re: MOre feedback Reply with quote

Hi Scott,

slander wrote:
Max,
But - another problem is that the hostname being passed into the function get_nagios_info is the Cacti long name, not the host name that nagios (or cacti) would use. For instance, it is passing this name: "XXXX Portland UU GW" while it knows nagios knows it as this: xxxx-uu-gw. The first two lines of the dashboard are these same two names, so, I know it has them at this point, just the wrong one is being passed in from the template.
Scott


There is a configuration field that lets you specify a regular expression to use to convert your Cacti names to Nagios names, let me know if you have problems using that. From config.php

// What to match/replace in order to make host name Nagios-friendly
$NAGIOS_HOST_MATCH = '';
$NAGIOS_HOST_REPLACE = '';

From line 139 of functions.php:

Code:

$nagios_host = preg_replace(Configuration::nagios_host_match(),
                                Configuration::nagios_host_replace(),
                                 $host);


So if you use a regular expression with capturing parens you can convert the host names from your Cacti format to Nagios format .

Hope this helps and thank you for all the feedback and comments!
Back to top
perldork
Cacti User


Joined: 05 Nov 2004
Posts: 68

PostPosted: Mon Dec 04, 2006 7:22 am    Post subject: Reply with quote

Hi,

I will be converting this project to be a Cacti plugin, so at that point I will change to use the Cacti functions for retrieving data over SNMP.

I will also add code to detect if SNMP functionality is present so that if there is no SNMP available the index.php controller will not try to retrieve the host description using SNMP as part of the host -> template match check.

Thanks for your input.

- Max

wazoqaz wrote:
I too am trying to install. I installed all the pear modules (I had most of them anyway), but I had problems becuase my php installation does not have --with-snmp. It is the same host as my Cacti server so it appears that Cacti does not requeire php with snmp support.

Is there anyway to get around the snmp requirement without a recompile of php?
Back to top
perldork
Cacti User


Joined: 05 Nov 2004
Posts: 68

PostPosted: Mon Dec 04, 2006 7:27 am    Post subject: Re: It's perfect Reply with quote

Hi Sergio,

TaTo wrote:
Dear perldork... your work is a lot for me!!

But i'm in trouble with this:

PHP Warning: Division by zero in /html/cacinda/inc/Windows_MS_SNMP.class.php on line 82

And not getting any RAM available graph



What version of Windows are you using? Are you using the native SNMP service or a third party agent?

Quote:

and as you can see cannot see any nagios status info:

Error retrieving Nagios content from http://localhost/nagios/cgi-bin/status.cgi

Is there any way to solve this ??



Where is Nagios installed on your network? Is it on the same host as Cacti? Do you have Apache (or whatever web server you are using) set up so that Nagios information can be retrieved without a username/password for that host?

Regards,
Max
Back to top
Smistir



Joined: 08 Nov 2006
Posts: 15
Location: Florida

PostPosted: Tue Dec 05, 2006 1:33 pm    Post subject: Some minor questions Reply with quote

Max,

I apologize for coming across as a newb. But I was curious.. My client requires that SNMP NOT be used. Is it a safe assumption that their requirement will greatly diminish the value of Cacinda?

It has been my understanding that most of Cacti uses SNMP. To date, I haven't been able to do much monitoring of my intended systems.

It has been discussed and decided in my group that the type of tool that you are building is exactly what we want and need.. but I am not sure about its functionality without SNMP.
Back to top
perldork
Cacti User


Joined: 05 Nov 2004
Posts: 68

PostPosted: Tue Dec 05, 2006 1:41 pm    Post subject: Re: Some minor questions Reply with quote

Hi Smistir,

I have made several non-SNMP dashboards with this simple framework, yes, it can be used for that purpose, you will probably have to remove some code that relies on SNMP for this to work with the current version, a future version of Cacinda will have wrapper code around the SNMP functions so that the SNMP functions will only be used if they are present.

Regards,
Max

Smistir wrote:
Max,

I apologize for coming across as a newb. But I was curious.. My client requires that SNMP NOT be used. Is it a safe assumption that their requirement will greatly diminish the value of Cacinda?

It has been my understanding that most of Cacti uses SNMP. To date, I haven't been able to do much monitoring of my intended systems.

It has been discussed and decided in my group that the type of tool that you are building is exactly what we want and need.. but I am not sure about its functionality without SNMP.
Back to top
high.pointe



Joined: 13 Oct 2006
Posts: 3

PostPosted: Wed Dec 06, 2006 8:12 pm    Post subject: No device class matches found for........ Reply with quote

No device class matches found for........

PD,

Regarding the above mentioned error.....

You referenced some information on fixing this earlier in the thread....

*************
config.php

// What to match/replace in order to make host name Nagios-friendly
$NAGIOS_HOST_MATCH = '';
$NAGIOS_HOST_REPLACE = '';

From line 139 of functions.php:

Code:

$nagios_host = preg_replace(Configuration::nagios_host_match(),
Configuration::nagios_host_replace(),
$host);
**************

But I'm still a bit of a newb when it comes to php so I haven't been able to figure out exactly the edits to make in order to resolve the error.

Any insight of any kind would be appreciated.

Thanks in advance.
Back to top
perldork
Cacti User


Joined: 05 Nov 2004
Posts: 68

PostPosted: Sun Dec 17, 2006 9:11 am    Post subject: Re: No device class matches found for........ Reply with quote

high.pointe wrote:
[size=18][b]No device class matches found
But I'm still a bit of a newb when it comes to php so I haven't been able to figure out exactly the edits to make in order to resolve the error.

Any insight of any kind would be appreciated.

Thanks in advance.


Based on what you had initially posted:

Quote:

The device name in Cacti is "XXXX Portland UU GW" while it knows nagios knows it as this: xxxx-uu-gw.


Code:

$NAGIOS_HOST_MATCH = '/(\S+)\s+\S+\s+(.*)/e';
$NAGIOS_HOST_REPLACE = "str_replace(' ', '-', strtolower('\${1}-\${2}'))";


This works for me to convert

XXXX NameofPlace UU Name to

xxxx-uu-name
Back to top
eohimor



Joined: 08 Jan 2007
Posts: 1

PostPosted: Mon Jan 08, 2007 10:24 am    Post subject: Error when Installing Browsing to Cacinda Reply with quote

Hello,

I am very much interested in this plugin.I have installed the Cacinda on my Cacti server which is also where my Nagios is installed.Whenever I try to open the Cacinda webpage.I get the error:'DB Error: connect failed.
Can anyone help?
My /var/www/html/cacti/include/config.php has the following :
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
#$database_default = "cacti";
$database_default = "cactidb";
$database_hostname = "localhost";
$database_username = "cactiuser";
#$database_password = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";

$plugins = array();
$plugins[] = 'thold';
$plugins[] = 'monitor';


while my /var/www/html/cacinda-0.1-alpha directory has the following

$SNMP_PORT = 161;

// Hosts per row for all.php
$HOSTS_PER_ROW = 4;

$ALL_HOSTS_WHERE = "1 = 1";

$CACTI_USERNAME = 'cactiuser';
$CACTI_PASSWORD = 'cactipw';
$CACTI_HOST = 'localhost';
$CACTI_SOCKET = false;
$CACTI_DATABASE = 'cactidb';
$CACTI_URL = '/cacti';


Any help will be greatly appreciated.Thanks[/b]
Back to top
knobdy
Cacti User


Joined: 28 Sep 2005
Posts: 495

PostPosted: Fri Jan 19, 2007 9:22 am    Post subject: Reply with quote

How much longer for the plugin? Any updates?
Back to top
perldork
Cacti User


Joined: 05 Nov 2004
Posts: 68

PostPosted: Fri Jan 26, 2007 10:55 am    Post subject: Re: Error when Installing Browsing to Cacinda Reply with quote

Hi,

What happens if you set CACTI_SOCKET to true?

- Max

eohimor wrote:
Hello,

I am very much interested in this plugin.I have installed the Cacinda on my Cacti server which is also where my Nagios is installed.Whenever I try to open the Cacinda webpage.I get the error:'DB Error: connect failed.
Can anyone help?
My /var/www/html/cacti/include/config.php has the following :
/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
#$database_default = "cacti";
$database_default = "cactidb";
$database_hostname = "localhost";
$database_username = "cactiuser";
#$database_password = "cactiuser";
$database_password = "cactipw";
$database_port = "3306";

$plugins = array();
$plugins[] = 'thold';
$plugins[] = 'monitor';


while my /var/www/html/cacinda-0.1-alpha directory has the following

$SNMP_PORT = 161;

// Hosts per row for all.php
$HOSTS_PER_ROW = 4;

$ALL_HOSTS_WHERE = "1 = 1";

$CACTI_USERNAME = 'cactiuser';
$CACTI_PASSWORD = 'cactipw';
$CACTI_HOST = 'localhost';
$CACTI_SOCKET = false;
$CACTI_DATABASE = 'cactidb';
$CACTI_URL = '/cacti';


Any help will be greatly appreciated.Thanks[/b]
Back to top
perldork
Cacti User


Joined: 05 Nov 2004
Posts: 68

PostPosted: Fri Jan 26, 2007 10:57 am    Post subject: Reply with quote

Hi knobdy,

Could be a few months still, sorry. I have this project on sf.net now, if people are interested in working with me on this, please contact me via sf.net .

http://cacinda.sf.net/

- Max

knobdy wrote:
How much longer for the plugin? Any updates?
Back to top
MorbidDK



Joined: 28 Apr 2005
Posts: 11

PostPosted: Thu Jun 21, 2007 1:03 am    Post subject: Reply with quote

Appears that I have the same error mentioned above.

No device class matches found for localhost (localhost)

From everything I can see Nagios host (localhost) matches the Cacti host (localhost), I just can't seem to get past this.
Back to top
perldork
Cacti User


Joined: 05 Nov 2004
Posts: 68

PostPosted: Thu Jun 21, 2007 7:50 am    Post subject: Reply with quote

What kind of a host is your localhost?

MorbidDK wrote:
Appears that I have the same error mentioned above.

No device class matches found for localhost (localhost)

From everything I can see Nagios host (localhost) matches the Cacti host (localhost), I just can't seem to get past this.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Addons for Cacti All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 



Powered by phpBB © 2001, 2005 phpBB Group