Forum archive
TKLPatch for Icinga (Nagios Fork)
Is there a FAQ for formatting the text? :/ Refer to attached txt till i figure out this forum. [text now added as post]... OK.. there is a part of the forum without the formatting help...
Hi, as i'm using your appliances since a while, i thought i should give you a big thanks for your work and a little patch i worked out for testing purposes.
The conf is kinda edgy but i'm still no programmer :>
So, what does it do?
Features:
- Latest Version of Icinga from Git
- Nagios-Plugins 1.4.15
- Idoutils (Mysql Backend)
This Patch is intended for the Core-Appliance. (Hardy & Lucid)
First, it sets the hostname to Icinga:
HOSTNAME=icinga echo "$HOSTNAME" > /etc/hostname sed -i "s|127.0.1.1 \(.*\)|127.0.1.1 $HOSTNAME|" /etc/hosts hostname $HOSTNAME
In the Second step it does an apt-get update + install:
install apache2 mysql-server build-essential libgd2-xpm-dev libjpeg62 libjpeg62-dev libpng12-0 libpng12-dev libdbi0 libdbi0-dev libdbd-mysql git-core
Then it creates the Users and Groups that are required:
echo 'Creating Icinga-User and Groups' /usr/sbin/useradd -m icinga passwd icinga < /tmp/passwd /usr/sbin/groupadd icinga-cmd /usr/sbin/usermod -a -G icinga-cmd icinga /usr/sbin/usermod -a -G icinga-cmd www-data
Then its about to get the sources:
echo 'Getting Sources' cd /usr/src git clone git://git.icinga.org/icinga-core.git wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz tar xzf nagios-plugins-1.4.15.tar.gz cd icinga-core
Then it configures and compiles Icinga:
./configure --with-command-group=icinga-cmd --enable-idoutils --enable-ssl make make all make cgis make install-cgis make install-html make install-webconf make fullinstall
Then it alters the configs so that ido2db works:
#ido2db Config cd /usr/local/icinga/etc/ mv ido2db.cfg-sample ido2db.cfg mv idomod.cfg-sample idomod.cfg sed -i "s/use_ssl=0/use_ssl=1/" ido2db.cfg idomod.cfg sed -i "s/#socket_type=tcp/socket_type=tcp/" ido2db.cfg idomod.cfg sed -i "s/socket_type=unix/#socket_type=unix/" ido2db.cfg idomod.cfg sed -i "s/output_type=unixsocket/#output_type=unixsocket/" idomod.cfg sed -i "s/#output_type=tcpsocket/output_type=tcpsocket/" idomod.cfg sed -i "s@output=/usr/@#output=/usr/@" idomod.cfg sed -i "s/#output=127.0.0.1/output=127.0.0.1/" idomod.cfg sed -i "s/db_pass=icinga/db_pass=turnkey/" ido2db.cfg sed -i "s@#broker_module=/usr/local/icinga/bin/idomod.o@broker_module=/usr/local/icinga/bin/idomod.o@" icinga.cfg
Then it generates the Database:
mysqladmin -u root password turnkey dbpasswd=`cat /tmp/passwd-db` /etc/init.d/mysql start mysql -uroot -p$dbpasswd < /tmp/icinga-db mysql -uroot -p$dbpasswd -D icinga < /usr/src/icinga-core/module/idoutils/db/mysql/mysql.sql
Compiling Nagios-Plugins:
cd /usr/src/nagios-plugins-1.4.15 ./configure --prefix=/usr/local/icinga --with-nagios-user=icinga make all make install
Startup and Apache-Config, the config for apache is embedded so we dont have to point to http://localhost/icinga just to http://localhost/
update-rc.d ido2db defaults update-rc.d icinga defaults a2dissite default
The Rest is cleanup:
apt-get -y remove build-essential libgd2-xpm-dev libjpeg62-dev libpng12-dev libdbi0-dev apt-get -y autoremove rm -rf /usr/src/*
For Icinga Docs go here:
http://docs.icinga.org/latest/en/
Cfg-Files of Icinga are located at: /usr/local/icinga/etc
Web-Frontend: http://localhost/
I'll try to integrate NagiosQL when the new version is out. It's a Web-Config tool for Nagios/Icinga.
Maybe i'll do a Nagios-one with Ndoutils and Pnp4nagios integrated (a data grapher)
I hope you don't mind but I took the liberty of editing your post and copy-pasting your text and formatting it.
As a long time TKL user and member here on the forums, it's always great to see someone new come along with something to offer back so thanks again. That's not to take away from others who may not have the knowledge or skills to provide patches, etc, but we can all do our little bit!
PS John; I forgot to answer your question re formatting FAQ. AFAIK there isn't one. Personally I just use the WYSIWYG buttons and they work pretty nice. If you want to use plain text then you can but I can't help at all with markup, perhaps someone else can?