Warning: Use of undefined constant is_home - assumed 'is_home' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 151

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 151

Warning: Use of undefined constant is_category - assumed 'is_category' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 152

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 152

Warning: Use of undefined constant is_archive - assumed 'is_archive' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 153

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 153

Warning: Use of undefined constant is_search - assumed 'is_search' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 154

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 154

Warning: Use of undefined constant is_tag - assumed 'is_tag' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 155

Warning: Use of undefined constant posts_per_page - assumed 'posts_per_page' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 155

Warning: Use of undefined constant is_tag - assumed 'is_tag' (this will throw an Error in a future version of PHP) in /u/r/rgreenwald/websites/www.russgreenwald.com/docroot/wp-content/plugins/different-posts-per-page/diff-posts-per-page.php on line 292
Nagios + NPC + Cacti | Russ Greenwald

Nagios + NPC + Cacti

Nagios + Cacti + NPC Plugin Install Instructions on Centos 5 I will post a full Nagios 3.x installation instruction later (yum install nagios). For the below, I will assume you have Nagios 3.x running and have a basic knowledge of Linux, file paths, commands, etc. Cacti 1. Follow the entire instruction set from here http://docs.cacti.net/manual:087:1_installation

Cacti + Plugin Architecture Install 1. Download http://mirror.cactiusers.org/downloads/plugins/cacti-plugin-0.8.7d-PA-v2.4.zip 2. tar -zvxf cacti-plugin-arch.tar.gz into the cacti directory, i.e. /var/www/cacti 3. We will first run this command from the Cacti directory patch -p1 -N –dry-run < cacti-plugin-arch.diff 4. If you don’t see any issues in step 3 then patch -p1 -N < cacti-plugin-arch.diff 5. It is necessary to configure your Cacti install after installing the Plugin Architecture for several reasons. First you will need to re-enter your database username and password (you can just pull the info out of your backup of your old includes/global.php). This is fairly straight forward and not necessary to cover here.

The other reason is that we now have a new config option which must be set in order for your Cacti install to function properly. When you edit your includes/global.php you will see this option $config[‘url_path’] = “/”; You will need to set this option to the URL location of your Cacti install. For instance, if you Cacti Install was reachable through a web browser at this location. http://servername/ Then it would not be necessary to modify the above default location. But if your Cacti Install was at http://servername/projects/cacti/testing/ then you would need to set the option to this $config[‘url_path’] = “/projects/cacti/testing/”; or it may be located here http://servername/cacti/ then you would need to set the option to this $config[‘url_path’] = “/cacti/”;

NPC 1. svn co http://svn2.assembla.com/svn/npc/trunk npc 2. Edit /etc/php.ini and update the memory_limit option. Set it to at least 32M Note on RHES/CentOS PHP 5.1.x: 3. Download http://aurore.net/projects/php-json/php-json-4.3.2_1.2.1-1.aurore.src.rpm 4. ‘yum install php-devel autoconf automake libtool’. 5. rpmbuild –rebuild php-json-4.3.2_1.2.1-1.aurore.src.rpm 6. rpm -ivh /usr/src/redhat/RPMS/x86_64/php-json-5.1.6_1.2.1-1.aurore.x86_64.rpm 7. Move npc into /var/www/cacti/plugins/ 8. mysql -uroot -p cacti < pa.sql 9. login to cacti as an admin. 10. Install the plugin in Cacti 11. Go to Console -> Plugin Management -> Uninstalled 12. Click the Install link under the npc section 13. Next, click the Installed tab 14. To enable NPC click the Enable link under the npc section 15. You can find the NPC plugin options under the Cacti Settings section

Note: If you do not see the Plugin Management link then go to user management and enable it.

nagios.cfg Make these changes to the nagios.cfg file check_external_commands=1 command_check_interval=-1 event_broker_options=-1 broker_module=/etc/nagios/ndomod.o config_file=/etc/nagios/ndomod.cfg process_performance_data=1

ndoutils 1. yum install ndoutils 2. cd /tmp 3. wget http://internap.dl.sourceforge.net/sourceforge/nagios/ndoutils-1.4b6.tar.gz 4. tar zxfv ndoutils-1.4b6.tar.gz 5. ./configure –enable-mysql –with-mysql-lib=/usr/lib64/mysql 6. make 7. cp /tmp/ndoutils-1.4b6/src/ndomod-2x.o /etc/nagios/ndomod.o 8. cp /tmp/ndoutils-1.4b6/src/ndo2db-2x /usr/bin/ndo2db 9. cp /tmp/ndoutils-1.4b6/config/ndo2db.cfg /etc/nagios/ 10. cp /tmp/ndoutils-1.4b6/config/ndomod.cfg /etc/nagios/

ndo2db.cfg Make these changes to the ndo2db.cfg file

db_servertype=mysql db_host=localhost (the host/ip where cacti database is running) db_port=3306 db_name=cacti (Your cacti database name) db_prefix=npc_ db_user= (Your cacti database user) db_pass= (Your cacti user password) socket_name=/var/log/nagios/ndo.sock

ndomod.cfg socket_name=/var/log/nagios/ndo.sock

/etc/init.d/ndoutils start service nagios restart

references http://trac2.assembla.com/npc http://cactiusers.org/wiki/PluginArchitectureInstall http://trac2.assembla.com/npc/wiki/QuickStartGuide http://forums.cacti.net/about32358.html http://nagioswiki.com/wiki/index.php/NDOutils_on_CentOS http://www.linuxquestions.org/questions/linux-newbie-8/problem-with-ndoutils-681691/


Comments are closed.