Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
It works!! I check my php installation on my windows box again since the problem is on the NPC host. So I checked and one of the two issues potentially solved the problem.
1) I had to enable pdo support for mysql.
2) I uninstalled Pear support.
Thanks Billy for all the help!!
Only question now is what would the NPC settings look like for since this is a remote Cacti host interacting with another remote Nagios host?
Thats great and is a first as far as I know So I am fairly certain that N2C which syncs hosts from Nagios to Cacti and auto creating data input methods from services will not work. In each of those cases I call command line scripts and use hard coded unix paths.
But, more importantly writing to the Nagios command file should work just fine as I use fopen and fwrite which are surely portable. So what you need to do is create a cifs (samba) share on your nagios box and share the /path/to/nagios/var/rw directory. Then mount the share in windows.
Under Console -> Settings -> NPC check to enable remote commands and then add the path to the command file. It will be something like:
I put the version NCP 2.0.4, but I have the mapping host with none yet. I dont now if I have to install another application in my windows server. I only install the cacti installer for windows and the ncp 2.0.4.
I created a samba share as you suggested.
enable remote commands under Console -> Settings -> NPC
add the path to the command file.
I still see the Nagios status displayed as "OFF"
Shouldn't that show up as "ON"
Is there something else that needs to be done?
Thanks again!
the nagios status of on or off simply comes from reading the database. If ndo2db were not running and the nagios process record was not updated for some certain amount of time nagios would display as off. So really in order to get it to show as on you need nagios and ndo2db running.
HI:
I installed the NPC plugin on my CACTI (windows 2003 server), and NAGIOS in centOS (there are in two differents boxes),(I see the Nagios web page), but when I try to Installed NDOUTILS I got in the message :"My SQL Library could no t be located), all the rest of cpmpilation is OK. So my question is: do ihave to install mysql in my centos?, because my BD Mysql is in my CACTI Box.
joseme wrote:HI:
I installed the NPC plugin on my CACTI (windows 2003 server), and NAGIOS in centOS (there are in two differents boxes),(I see the Nagios web page), but when I try to Installed NDOUTILS I got in the message :"My SQL Library could no t be located), all the rest of cpmpilation is OK. So my question is: do ihave to install mysql in my centos?, because my BD Mysql is in my CACTI Box.
thanks.
You need to install the mysql development libraries on centos that would be: yum install mysql-devel
ZarayK wrote:I can´t see these files: /ndo.sock
/ndo2db.debug
/ndomod.tmp
any idea??
Thanks
Are you going for the vague award? Seriously though I am not sure what your asking. What leads you to believe you should be able to see those files? What steps have you taken and what works and doesn't work?
Hi Divagater:
I got install NDOutils in my centos(thanks for you advice), so i got to connect it to mysql in my windows box (CACTI):
[root@localhost var]# mysql -u cactiuser -p -h 172.31.123.27 cacti
mysql> select host_id,alias,address from npc_hosts;
+---------+------------------------+---------------+
| host_id | alias | address |
+---------+------------------------+---------------+
| 1 | Linksys SRW224P Switch | x.x.x.x |
| 2 | localhost | 127.0.0.1 |
+---------+------------------------+---------------+
2 rows in set (0.01 sec)
But I can not see the NPC working in CACTI, look at the capture:
my nagios.log looks:
[root@localhost var]# tail -f nagios.log
[1250606097] SERVICE ALERT: linksys-srw224p;Uptime;CRITICAL;SOFT;2;(Return code of 127 is out of bounds - plugin may be missing)
[1250606117] Warning: Return code of 127 for check of service 'Port 1 Link Status' on host 'linksys-srw224p' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1250606217] Warning: Return code of 127 for check of service 'Uptime' on host 'linksys-srw224p' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1250606217] SERVICE NOTIFICATION: nagiosadmin;linksys-srw224p;Uptime;CRITICAL;notify-service-by-email;(Return code of 127 is out of bounds - plugin may be missing)
[1250606717] Warning: Return code of 127 for check of service 'Port 1 Link Status' on host 'linksys-srw224p' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1250606817] Warning: Return code of 127 for check of service 'Uptime' on host 'linksys-srw224p' was out of bounds. Make sure the plugin you're trying to run actually exists.
[1250607317] Warning: Return code of 127 for check of service 'Port 1 Link Status' on host 'linksys-srw224p' was out of bounds. Make sure the plugin you're trying to run actually exists.
my configuration in my cacti box is:
Cacti Version 0.8.7d
Plugin Architecture 2.4
Poller Type CMD.php
Server Info Windows NT 5.2
Web Server Microsoft-IIS/6.0
PHP Version 5.2.9
PHP Extensions bcmath, calendar, com_dotnet, ctype, session, filter, ftp, hash, iconv, json, odbc, pcre, Reflection, date, libxml, standard, tokenizer, zlib, SimpleXML, dom, SPL, wddx, xml, xmlreader, xmlwriter, ISAPI, ldap, mysql, snmp, sockets, SourceGuardian, gd, PDO, pdo_mysql
MySQL Version 5.0.77-community-nt
my question is why (in the capture) Nagios is OFF(in red)?, because my npc_hosts table has data so it means there is connection.
joseme, your nagios logs dont show anything about ndo2db, instead it just says that nagios is trying to execute some plugins but they are not there. Install the nagios plugins and read nagios docs.
Because the nagios status portlet shows notifications, host checks, and service checks enabled we can be sure that your pdo and json support for php are working.
Nagios shows OFF if the npc_programstatus does not have a recent status_update_time. Do a:
select * from npc_programstatus \G
Look at the status_update_time. It should show an update within the last couple minutes if nagios is running and updating things. First get nagios so its actually executing plugins for service checks then in Cacti go to Console -> Settings -> NPC and look at the option called 'Host/Service Config Type'
I checked my npc_programstatus table by doing a "select * from npc_programstatus \G;" on my cacti box. The result was that the nagios process record was not updated as it is showing a previous date. All else works as far as showing me nagios data through the NPC plugin. I can see all my host and there status. In Console->Settings-->NPC-->Host/Service Config Type is set to 1.
With this result the Nagios Status bar shows "Off" and Notifications, Host Checks, and Service show up as "NA". Host Status Summary and Service Status Summary all work.
When I set Host/Service Config Type 0. All of the above show up as "NA"
Thanks for this wonderfull plugin, I have just a minor problem that I just cant find how to solve, the nagios process always appears Off, just as the previous 2 or 3 posts, I have checked the npc_programstatus table and the status_update_time is being updated correctly, but this doesnt reflects in the nagios status panel, everything else works fine I have host/services information, comments can be added an so on.
I know that its just a status indicator but it kinds of looks not ready when the process appears off, can somebody help.
divagater
I have been working on a new install for about a week and a half now.
We have been running Cacti for about two years and just setup a new environment for both Nagios and Cacti for the integration of the two.
Before we start adding too many devices I would like to get a couple of devices working in both environments.
Here is where I am at.
Nagios appears to be fully operational.
I have not added any devices to Cacti yet as I would like them to be imported from Nagios.
The host I have created show up in the Cacti npc_ tables, but when I go to import them under N2C I get a message "There are no hosts available for import in the selected hostgroup"
I also do not see anything in the templates column?
I have tried several things mentioned over multiple post and verified others.
I have Webex available to me, so when you get a chance I would like to get together.
I see great prospects for us to implement this plug-in.