Nagios Plugin For Cacti

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
agnesresama
Posts: 2
Joined: Tue Apr 21, 2015 10:52 pm

Nagios Plugin For Cacti

Post by agnesresama »

i have installed NPC but, nagios status always OFF not ON. How solution about that?
Attachments
Capture.JPG
Capture.JPG (152.31 KiB) Viewed 1892 times
juraincse
Posts: 3
Joined: Mon May 16, 2016 3:28 am

Re: Nagios Plugin For Cacti

Post by juraincse »

Fix the databases (NPC plugin does not create them correctly):
Going back to the SSH terminal:
sudo mysql -uroot -p cacti
<Enter Password>

Code:
ALTER TABLE `npc_hostchecks` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_hoststatus` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_servicechecks` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_servicestatus` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_statehistory` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_eventhandlers` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_systemcommands` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
ALTER TABLE `npc_notifications` ADD COLUMN `long_output` varchar(8192) NOT NULL default '' AFTER `output`;
exit


Enable ndo2db:
Code:
sudo nano /etc/default/ndoutils

ENABLE_NDOUTILS=1

Enable NPC:
Going back to http://HOSTNAME/cacti
Open "Plugin Management"
Enable the NPC Plugin.
Open "Settings -> NPC"
Put a check in "Remote Commands"
Enter "/var/lib/nagios3/rw/nagios.cmd" Nagios Command File Path
Choose your date format.
Click "Save"

Start/Restart Services:

Back to SSH Terminal
Code:
sudo service nagios3 restart
sudo service ndoutils restart
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests