NPC - Nagios Plugin for Cacti
Moderators: Developers, Moderators
Re: NPC - Nagios Plugin for Cacti
Are there any indications of errors in the Cacti log? How about the standard error log?
Before history, there was a paradise, now dust.
Re: NPC - Nagios Plugin for Cacti
Hi Osiris,
There are no errors in cacti.log.
But there are many errors in cacti_stderr.log.
Almost all are:" Cannot adopt OID in..." If you need me to upload the file, ask me.
Do you want me to look somewhere else?
Thank you so much for everything. Hopefully we can put it to work
There are no errors in cacti.log.
But there are many errors in cacti_stderr.log.
Almost all are:" Cannot adopt OID in..." If you need me to upload the file, ask me.
Do you want me to look somewhere else?
Thank you so much for everything. Hopefully we can put it to work
Re: NPC - Nagios Plugin for Cacti
I would compress the file and then email it to developers@cacti.net so that it can be reviewed.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: NPC - Nagios Plugin for Cacti
Hi netniV,
As you recommend, I have sent the log to developers@cacti.net
Yesterday I was reviewing the log in depth, and I found something:
In the cacti log, the following errors appear:
- ERROR PHP DEPRECATED in Plugin 'npc': Non-static method NpcHostgroupsController::getHostgroups() should not be called statically in file: /opt/cacti/plugins/npc/controllers/sync.php on line: 150
- CMDPHP PHP ERROR Backtrace: (/plugins/npc/npc.php[76]:NpcSyncController->listHostgroups(), /plugins/npc/controllers/sync.php[150]:CactiErrorHandler())
- ERROR PHP ERROR in Plugin 'npc': Uncaught Error: Using $this when not in object context in /opt/cacti/plugins/npc/controllers/hostgroups.php:332 Stack trace: #0 /opt/cacti/plugins/npc/controllers/sync.php(150): NpcHostgroupsController::getHostgroups() #1 /opt/cacti/plugins/npc/npc.php(76): NpcSyncController->listHostgroups(Array) #2 {main} thrown in file: /opt/cacti/plugins/npc/controllers/hostgroups.php on line: 332
- CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
- CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'npc'
** And I'm disabled the plugin, having to go back to Console -> Settings -> Plugins to re-enable it
And on the other hand, when I run the following command in the console:
sudo tail -f /var/log/syslog
I can see that the following error is repeated:
- ndo2db[13992]: mysql_error: 'Unknown column 'long_output' in 'field list''
Hope that helps. Thank you so much for everything!!
*I also attach the log that I have sent by email
As you recommend, I have sent the log to developers@cacti.net
Yesterday I was reviewing the log in depth, and I found something:
In the cacti log, the following errors appear:
- ERROR PHP DEPRECATED in Plugin 'npc': Non-static method NpcHostgroupsController::getHostgroups() should not be called statically in file: /opt/cacti/plugins/npc/controllers/sync.php on line: 150
- CMDPHP PHP ERROR Backtrace: (/plugins/npc/npc.php[76]:NpcSyncController->listHostgroups(), /plugins/npc/controllers/sync.php[150]:CactiErrorHandler())
- ERROR PHP ERROR in Plugin 'npc': Uncaught Error: Using $this when not in object context in /opt/cacti/plugins/npc/controllers/hostgroups.php:332 Stack trace: #0 /opt/cacti/plugins/npc/controllers/sync.php(150): NpcHostgroupsController::getHostgroups() #1 /opt/cacti/plugins/npc/npc.php(76): NpcSyncController->listHostgroups(Array) #2 {main} thrown in file: /opt/cacti/plugins/npc/controllers/hostgroups.php on line: 332
- CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
- CMDPHP ERRORS DETECTED - DISABLING PLUGIN 'npc'
** And I'm disabled the plugin, having to go back to Console -> Settings -> Plugins to re-enable it
And on the other hand, when I run the following command in the console:
sudo tail -f /var/log/syslog
I can see that the following error is repeated:
- ndo2db[13992]: mysql_error: 'Unknown column 'long_output' in 'field list''
Hope that helps. Thank you so much for everything!!
*I also attach the log that I have sent by email
- Attachments
-
- npc plugin log.zip
- (33.39 KiB) Downloaded 103 times
Re: NPC - Nagios Plugin for Cacti
Due to your version of phone and doctrine. It's on my list of things to look at, but it's way down it. Likely works better on strait centos 7.
Before history, there was a paradise, now dust.
Re: NPC - Nagios Plugin for Cacti
Hi Osiris,
Sorry for my ignorance, but I think that seeing the log is more likely to be a php problem, rather than the version.
I am currently using Ubuntu.
Thank you very much for the help!!
Sorry for my ignorance, but I think that seeing the log is more likely to be a php problem, rather than the version.
I am currently using Ubuntu.
Thank you very much for the help!!
Re: NPC - Nagios Plugin for Cacti
Might have been a mix up there but yea I would agree that this looks like a PHP problem. I have had it before when I switched a function from being an instance function to being a static but the code had a line that referenced $this. Not sure if that was the case with this, but I've just updated the two lines with what I believe to be the correct usage. See how you fair with the latest develop version.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: NPC - Nagios Plugin for Cacti
Hi netniV,
I downloaded the latest version, and it's more stable.
It still does not work, but there are fewer errors.
The errors that appear to me now are:
NPC DEBUG [NpcLayoutController] (drawLayout) - Script execution time: 0.00 seconds
NPC DEBUG [NpcNagiosController] (getProgramStatus) - Script execution time: 0.07 seconds
NPC DEBUG [NpcHostsController] (summary) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostgroupsController] (getHostgroupServiceStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicesController] (summary) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicesController] (getServices) - Script execution time: 0.01 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroups) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getHostStatusPortlet) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getHostStatusPortlet) - Script execution time: 0.00 seconds
NPC DEBUG [NpcLogentriesController] (getLogs) - Script execution time: 0.01 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroups) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroupServiceStatus) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroupServiceStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostgroupsController] (getHostgroupHostStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostsController] (getHosts) - Script execution time: 0.01 seconds
NPC DEBUG [NpcNagiosController] (checkPerf) - Script execution time: 0.01 seconds
NPC DEBUG [NpcHostsController] (getHosts) - Script execution time: 0.01 seconds
NPC DEBUG [NpcCactiController] (getHostTemplates) - Script execution time: 0.02 seconds
NPC DEBUG [NpcSyncController] (listHostgroups) - Script execution time: 0.01 seconds
NPC DEBUG [NpcSyncController] (getHosts) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostsController] (getHosts) - Script execution time: 0.01 seconds
NPC DEBUG [NpcNagiosController] (getProgramStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostsController] (getHosts) - Script execution time: 0.01 seconds
NPC DEBUG [NpcHostsController] (summary) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicesController] (summary) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostgroupsController] (getHostgroupServiceStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicesController] (getServices) - Script execution time: 0.01 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroups) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroupServiceStatus) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroupServiceStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroups) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getHostStatusPortlet) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getHostStatusPortlet) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostgroupsController] (getHostgroupHostStatus) - Script execution time: 0.00 seconds
I have looked in the cacti database, and it does not insert any data.
Could it be for some privilege of some folder or some executable? ¿Maybe nagios.cmd?
As a tip, I think it would be nice to introduce how the privileges are to be in the manual so that there is no doubt.
It would also be interesting to modify the document "upgrade_schema" and add "IF NOT EXISTS", leaving the structure as follows:
CREATE INDEX IF NOT EXISTS idx1 ON npc_logentries(entry_time, entry_time_usec);
CREATE INDEX IF NOT EXISTS idx1 ON npc_services(config_type);
CREATE INDEX IF NOT EXISTS idx2 ON npc_services(host_object_id);
CREATE INDEX IF NOT EXISTS idx3 ON npc_services(service_object_id);
CREATE INDEX IF NOT EXISTS idx1 ON npc_hosts(host_object_id);
CREATE INDEX IF NOT EXISTS idx2 ON npc_hosts(config_type);
CREATE INDEX IF NOT EXISTS idx1 ON npc_servicestatus(current_state);
CREATE INDEX IF NOT EXISTS idx1 ON npc_hoststatus(current_state);
CREATE INDEX IF NOT EXISTS idx1 ON npc_comments(object_id);
CREATE INDEX IF NOT EXISTS idx1 ON npc_host_graphs(host_object_id);
CREATE INDEX IF NOT EXISTS idx1 ON npc_service_graphs(service_object_id);
CREATE INDEX IF NOT EXISTS idx1 ON npc_servicechecks(service_object_id, start_time);
CREATE INDEX IF NOT EXISTS idx2 ON npc_servicechecks(instance_id, start_time);
We continue making tests. Everything to improve the plugin and start it up.
Thank you very much and greetings,
I downloaded the latest version, and it's more stable.
It still does not work, but there are fewer errors.
The errors that appear to me now are:
NPC DEBUG [NpcLayoutController] (drawLayout) - Script execution time: 0.00 seconds
NPC DEBUG [NpcNagiosController] (getProgramStatus) - Script execution time: 0.07 seconds
NPC DEBUG [NpcHostsController] (summary) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostgroupsController] (getHostgroupServiceStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicesController] (summary) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicesController] (getServices) - Script execution time: 0.01 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroups) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getHostStatusPortlet) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getHostStatusPortlet) - Script execution time: 0.00 seconds
NPC DEBUG [NpcLogentriesController] (getLogs) - Script execution time: 0.01 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroups) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroupServiceStatus) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroupServiceStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostgroupsController] (getHostgroupHostStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostsController] (getHosts) - Script execution time: 0.01 seconds
NPC DEBUG [NpcNagiosController] (checkPerf) - Script execution time: 0.01 seconds
NPC DEBUG [NpcHostsController] (getHosts) - Script execution time: 0.01 seconds
NPC DEBUG [NpcCactiController] (getHostTemplates) - Script execution time: 0.02 seconds
NPC DEBUG [NpcSyncController] (listHostgroups) - Script execution time: 0.01 seconds
NPC DEBUG [NpcSyncController] (getHosts) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostsController] (getHosts) - Script execution time: 0.01 seconds
NPC DEBUG [NpcNagiosController] (getProgramStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostsController] (getHosts) - Script execution time: 0.01 seconds
NPC DEBUG [NpcHostsController] (summary) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicesController] (summary) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostgroupsController] (getHostgroupServiceStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicesController] (getServices) - Script execution time: 0.01 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroups) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroupServiceStatus) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroupServiceStatus) - Script execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getServicegroups) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getHostStatusPortlet) - Method execution time: 0.00 seconds
NPC DEBUG [NpcServicegroupsController] (getHostStatusPortlet) - Script execution time: 0.00 seconds
NPC DEBUG [NpcHostgroupsController] (getHostgroupHostStatus) - Script execution time: 0.00 seconds
I have looked in the cacti database, and it does not insert any data.
Could it be for some privilege of some folder or some executable? ¿Maybe nagios.cmd?
As a tip, I think it would be nice to introduce how the privileges are to be in the manual so that there is no doubt.
It would also be interesting to modify the document "upgrade_schema" and add "IF NOT EXISTS", leaving the structure as follows:
CREATE INDEX IF NOT EXISTS idx1 ON npc_logentries(entry_time, entry_time_usec);
CREATE INDEX IF NOT EXISTS idx1 ON npc_services(config_type);
CREATE INDEX IF NOT EXISTS idx2 ON npc_services(host_object_id);
CREATE INDEX IF NOT EXISTS idx3 ON npc_services(service_object_id);
CREATE INDEX IF NOT EXISTS idx1 ON npc_hosts(host_object_id);
CREATE INDEX IF NOT EXISTS idx2 ON npc_hosts(config_type);
CREATE INDEX IF NOT EXISTS idx1 ON npc_servicestatus(current_state);
CREATE INDEX IF NOT EXISTS idx1 ON npc_hoststatus(current_state);
CREATE INDEX IF NOT EXISTS idx1 ON npc_comments(object_id);
CREATE INDEX IF NOT EXISTS idx1 ON npc_host_graphs(host_object_id);
CREATE INDEX IF NOT EXISTS idx1 ON npc_service_graphs(service_object_id);
CREATE INDEX IF NOT EXISTS idx1 ON npc_servicechecks(service_object_id, start_time);
CREATE INDEX IF NOT EXISTS idx2 ON npc_servicechecks(instance_id, start_time);
We continue making tests. Everything to improve the plugin and start it up.
Thank you very much and greetings,
Re: NPC - Nagios Plugin for Cacti
I would open that as an issue on the NPC plugin so it gets tracked. I only made a minor mod to the code because it's basic PHP functionality. I don't know much about how the plugin itself works as I've never worked on it (aside from the aforementioned minor tweakage).
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: NPC - Nagios Plugin for Cacti
Hello,
I'm trying to make this plugin work on my cacti by using this version (https://github.com/Cacti/plugin_npc).
I can see it and enable it in Cacti.
I've installed NDOutils for my Nagios 4/debian 9 by following this guide (https://support.nagios.com/kb/article/n ... tml#Debian). Eveything is Ok.
I have a user ndoutils, a database nagios with prefix nagios_ et ndo2db feeds correctly my database.
But NPC show me a white screen.
I can't find what I doing wrong so I need help.
Kind regards,
Tiki
I'm trying to make this plugin work on my cacti by using this version (https://github.com/Cacti/plugin_npc).
I can see it and enable it in Cacti.
I've installed NDOutils for my Nagios 4/debian 9 by following this guide (https://support.nagios.com/kb/article/n ... tml#Debian). Eveything is Ok.
I have a user ndoutils, a database nagios with prefix nagios_ et ndo2db feeds correctly my database.
But NPC show me a white screen.
I can't find what I doing wrong so I need help.
Kind regards,
Tiki
Re: NPC - Nagios Plugin for Cacti
Hi again,
After some modification to configuration, I have npc_* in my cacti database.
I modified some tables.
But my table npc_host is not feeded. So i still got a white screen.
Kind regards,
Tiki10
After some modification to configuration, I have npc_* in my cacti database.
I modified some tables.
But my table npc_host is not feeded. So i still got a white screen.
Kind regards,
Tiki10
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: NPC - Nagios Plugin for Cacti
Turn on your browsers debug windows and goto the Console tab. Then regenerate the problem. Post a screen shot of the errors that appear in the Console.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Re: NPC - Nagios Plugin for Cacti
Hello @TheWitness,
Is this what you asking for ?
kind regards,
Tiki
Is this what you asking for ?
kind regards,
Tiki
- Attachments
-
- SnapCrab_NoName_2020-4-8_11-58-25_No-00.png (128.73 KiB) Viewed 3547 times
Re: NPC - Nagios Plugin for Cacti
Wrong tab. Need console tab.
Before history, there was a paradise, now dust.
Re: NPC - Nagios Plugin for Cacti
Hello Osiris,
This is the result of console tab.
Kind regards,
Tiki
This is the result of console tab.
Kind regards,
Tiki
- Attachments
-
- SnapCrab_NoName_2020-4-8_14-51-3_No-00.png (165.54 KiB) Viewed 3546 times
Who is online
Users browsing this forum: No registered users and 3 guests