Difference between revisions of "Icinga2"
(11 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
* <code>apt-get install vim-icinga2</code> (this is optional) | * <code>apt-get install vim-icinga2</code> (this is optional) | ||
* <code>icinga2 feature enable command</code> | * <code>icinga2 feature enable command</code> | ||
+ | * <code>icinga2 feature enable api</code> | ||
+ | * <code>icinga2 api setup</code> | ||
+ | |||
+ | * validate basic icinga2 is working | ||
+ | ** <code>systemctl restart icinga2</code> | ||
+ | ** <code>systemctl status icinga2</code> | ||
+ | |||
+ | |||
+ | |||
* <code>apt-get install icingaweb2</code> | * <code>apt-get install icingaweb2</code> | ||
** /etc/php/7.0/apache2/php.ini: set date.timezone = Europe/Copenhagen | ** /etc/php/7.0/apache2/php.ini: set date.timezone = Europe/Copenhagen | ||
** mysql: create database for icingaweb | ** mysql: create database for icingaweb | ||
** open http://your-icinga-server/icingaweb2/ and follow the wizard | ** open http://your-icinga-server/icingaweb2/ and follow the wizard | ||
+ | |||
+ | Add hosts and services to /etc/icinga2/conf.d/ . | ||
+ | you need to restart icinga2 in order to load new config <code>systemctl restart icinga2</code> | ||
+ | |||
+ | = Agent push of icinga settings= | ||
+ | |||
+ | * see this http://linoxide.com/ubuntu-how-to/add-host-manage-services-icinga2/ | ||
+ | * debian7/8 - stay to manual conf or other means | ||
+ | * debian9 | ||
+ | ** <code> apt-get install icinga2 monitoring-plugins-basic</code> | ||
+ | ** <code>icinga2 node wizard</code> | ||
+ | |||
+ | |||
+ | = Icinga Director = | ||
+ | * <code>apt-get install php-curl</code> | ||
+ | * read http://www.stankowic-development.net/?p=6987&lang=en | ||
+ | * ..a and Read [https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/02-Installation.md github install guide] | ||
+ | * ... and this [https://github.com/Icinga/icingaweb2-module-director/blob/master/doc/04-Getting-started.md] | ||
+ | * create database for director | ||
+ | * add database to icingaweb -> configuration -> application -> resources | ||
+ | * download latest release from github to /usr/share/icingaweb2/modules and unpack it | ||
+ | * enable the module icingaweb -> configuration -> modules | ||
+ | * choose director from left hand menu | ||
+ | |||
+ | = Dashing Icinga2= | ||
+ | https://github.com/Icinga/dashing-icinga2 | ||
+ | * apt-get -y install ruby bundler nodejs git | ||
+ | ** cd /usr/share | ||
+ | ** git clone https://github.com/Icinga/dashing-icinga2.git | ||
+ | ** cd dashing-icinga2 | ||
+ | ** bundle | ||
+ | * vim /etc/icinga2/conf.d/api-users.conf | ||
+ | |||
+ | object ApiUser "dashing" { | ||
+ | password = "icinga2ondashingr0xx" | ||
+ | permissions = [ "status/query", "objects/query/*" ] | ||
+ | } | ||
+ | *vim config/icinga2.json | ||
+ | |||
+ | { | ||
+ | "icinga2": { | ||
+ | "api": { | ||
+ | "host": "localhost", | ||
+ | "port": 5665, | ||
+ | "user": "dashing", | ||
+ | "password": "icinga2ondashingr0xx" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | * and just follow the setup guide https://github.com/Icinga/dashing-icinga2 |
Latest revision as of 09:52, 31 August 2017
Base Icinga2 + web2
Notes for setting up icinga2 on Debian9/Stretch
- see this https://www.howtoforge.com/tutorial/install-icinga2-and-icingaweb2-on-centos-7/
- base debian9 vm (2vcpu + 1gb mem + 4gb disk)
apt-get install mariadb-server
(note that mariadb root uses socket auth like postgres has been doing for many years)apt-get install icinga2 monitoring-plugins icingacli
apt-get install icinga2-ido-mysql
(this will create database and mysql user)icinga2 feature enable ido-mysql
(make sure the module is enabled)apt-get install vim-icinga2
(this is optional)icinga2 feature enable command
icinga2 feature enable api
icinga2 api setup
- validate basic icinga2 is working
systemctl restart icinga2
systemctl status icinga2
apt-get install icingaweb2
- /etc/php/7.0/apache2/php.ini: set date.timezone = Europe/Copenhagen
- mysql: create database for icingaweb
- open http://your-icinga-server/icingaweb2/ and follow the wizard
Add hosts and services to /etc/icinga2/conf.d/ .
you need to restart icinga2 in order to load new config systemctl restart icinga2
Agent push of icinga settings
- see this http://linoxide.com/ubuntu-how-to/add-host-manage-services-icinga2/
- debian7/8 - stay to manual conf or other means
- debian9
apt-get install icinga2 monitoring-plugins-basic
icinga2 node wizard
Icinga Director
apt-get install php-curl
- read http://www.stankowic-development.net/?p=6987&lang=en
- ..a and Read github install guide
- ... and this [1]
- create database for director
- add database to icingaweb -> configuration -> application -> resources
- download latest release from github to /usr/share/icingaweb2/modules and unpack it
- enable the module icingaweb -> configuration -> modules
- choose director from left hand menu
Dashing Icinga2
https://github.com/Icinga/dashing-icinga2
- apt-get -y install ruby bundler nodejs git
- cd /usr/share
- git clone https://github.com/Icinga/dashing-icinga2.git
- cd dashing-icinga2
- bundle
- vim /etc/icinga2/conf.d/api-users.conf
object ApiUser "dashing" { password = "icinga2ondashingr0xx" permissions = [ "status/query", "objects/query/*" ] }
- vim config/icinga2.json
{ "icinga2": { "api": { "host": "localhost", "port": 5665, "user": "dashing", "password": "icinga2ondashingr0xx" } } }
- and just follow the setup guide https://github.com/Icinga/dashing-icinga2