Arch Icinga2: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
| (16 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
=notwendige pakete= | =notwendige pakete= | ||
| − | *[thomas@barclay local]$ sudo pacman -S libmariadbclient monitoring-plugins yajl postgresql-libs libmariadbclient cmake boost yajl boost-libs | + | *[thomas@barclay local]$ sudo pacman -S libmariadbclient monitoring-plugins yajl postgresql-libs libmariadbclient cmake boost yajl boost-libs php php-apache gd |
=icinga2 download, entpacken, bauen und installieren= | =icinga2 download, entpacken, bauen und installieren= | ||
*[thomas@barclay local]$ curl -O https://aur.archlinux.org/packages/ic/icinga2/icinga2.tar.gz | *[thomas@barclay local]$ curl -O https://aur.archlinux.org/packages/ic/icinga2/icinga2.tar.gz | ||
| Zeile 13: | Zeile 13: | ||
*[thomas@barclay icinga-classic-ui]$ makepkg | *[thomas@barclay icinga-classic-ui]$ makepkg | ||
*[thomas@barclay icinga-classic-ui]$ sudo pacman -U icinga-classic-ui-1.12.0-1-x86_64.pkg.tar.xz | *[thomas@barclay icinga-classic-ui]$ sudo pacman -U icinga-classic-ui-1.12.0-1-x86_64.pkg.tar.xz | ||
| + | =user http zur gruppe icingacmd fügen= | ||
| + | *[root@barclay icinga2]# gpasswd -a http icingacmd | ||
| + | =icingaadmin anlegen= | ||
| + | *[root@barclay icinga2]# htpasswd -b -c /etc/icinga2/users icingaadmin 'sysadm' | ||
| + | ==rechte setzen== | ||
| + | *[root@arch ~]# chmod o+rx /etc/icinga2 | ||
| + | *[root@arch ~]# chgrp icingacmd /etc/icinga2/users | ||
| + | =anpassen des webserver= | ||
| + | *[root@barclay ~]# mv /etc/httpd/conf.d/icinga.conf /etc/httpd/conf/extra/icinga.conf | ||
| + | ==/etc/http/conf/httpd.conf== | ||
| + | <pre> | ||
| + | #dies muss raus ... | ||
| + | #LoadModule mpm_event_module modules/mod_mpm_event.so | ||
| + | LoadModule mpm_prefork_module modules/mod_mpm_prefork.so | ||
| + | LoadModule php5_module modules/libphp5.so | ||
| + | LoadModule cgi_module modules/mod_cgi.so | ||
| + | Include conf/extra/icinga.conf | ||
| + | Include "conf/extra/php5_module.conf" | ||
| + | php_admin_flag safe_mode Off | ||
| + | php_admin_value open_basedir none | ||
| + | </pre> | ||
| + | |||
| + | =feature enablen= | ||
| + | *[root@barclay ~]# icinga2 feature enable statusdata compatlog command | ||
| + | =anpassen des /etc/httpd/conf/extra/icinga.conf= | ||
| + | ==wir ändern== | ||
| + | ScriptAlias /cgi-bin "/usr/share/icinga-classic-ui/sbin" | ||
| + | zu | ||
| + | ScriptAlias /icinga/cgi-bin "/usr/share/icinga-classic-ui/sbin" | ||
| + | und | ||
| + | Alias / "/usr/share/icinga-classic-ui/share/" | ||
| + | zu | ||
| + | Alias /icinga "/usr/share/icinga-classic-ui/share/" | ||
| + | ==/etc/cgi.cfg== | ||
| + | <pre> | ||
| + | ain_config_file=/etc/icinga2/icinga.cfg | ||
| + | standalone_installation=1 | ||
| + | physical_html_path=/usr/share/icinga-classic-ui/share | ||
| + | url_html_path=/icinga | ||
| + | url_stylesheets_path=/icinga/stylesheets | ||
| + | http_charset=utf-8 | ||
| + | refresh_rate=90 | ||
| + | refresh_type=1 | ||
| + | escape_html_tags=1 | ||
| + | result_limit=50 | ||
| + | show_tac_header=1 | ||
| + | use_pending_states=1 | ||
| + | first_day_of_week=0 | ||
| + | suppress_maintenance_downtime=0 | ||
| + | action_url_target=main | ||
| + | notes_url_target=main | ||
| + | read_gzip_logs=0 | ||
| + | use_authentication=1 | ||
| + | use_ssl_authentication=0 | ||
| + | lowercase_user_name=0 | ||
| + | authorized_for_system_information=icingaadmin | ||
| + | authorized_for_configuration_information=icingaadmin | ||
| + | authorized_for_full_command_resolution=icingaadmin | ||
| + | authorized_for_system_commands=icingaadmin | ||
| + | authorized_for_all_services=icingaadmin | ||
| + | authorized_for_all_hosts=icingaadmin | ||
| + | authorized_for_all_service_commands=icingaadmin | ||
| + | authorized_for_all_host_commands=icingaadmin | ||
| + | show_all_services_host_is_authorized_for=1 | ||
| + | show_partial_hostgroups=0 | ||
| + | show_partial_servicegroups=0 | ||
| + | default_statusmap_layout=5 | ||
| + | status_show_long_plugin_output=0 | ||
| + | display_status_totals=0 | ||
| + | highlight_table_rows=1 | ||
| + | sort_status_data_by_default=0 | ||
| + | use_logging=1 | ||
| + | cgi_log_file=/var/log/icinga//icinga-cgi.log | ||
| + | cgi_log_rotation_method=d | ||
| + | cgi_log_archive_path=/var/log/icinga/ | ||
| + | enforce_comments_on_actions=0 | ||
| + | send_ack_notifications=1 | ||
| + | persistent_ack_comments=0 | ||
| + | lock_author_names=1 | ||
| + | default_downtime_duration=7200 | ||
| + | set_expire_ack_by_default=0 | ||
| + | default_expiring_acknowledgement_duration=86400 | ||
| + | default_expiring_disabled_notifications_duration=86400 | ||
| + | disable_cmd_cgi_csrf_protection=0 | ||
| + | set_sticky_acknowledgment=1 | ||
| + | tac_show_only_hard_state=0 | ||
| + | show_tac_header_pending=1 | ||
| + | exclude_customvar_name=PASSWORD,COMMUNITY | ||
| + | exclude_customvar_value=secret | ||
| + | extinfo_show_child_hosts=0 | ||
| + | tab_friendly_titles=1 | ||
| + | object_cache_file=/var/cache/icinga2/objects.cache | ||
| + | status_file=/var/cache/icinga2/status.dat | ||
| + | resource_file=/etc/icinga2/resource.cfg | ||
| + | command_file=/var/run/icinga2/cmd/icinga2.cmd | ||
| + | check_external_commands=1 | ||
| + | interval_length=60 | ||
| + | status_update_interval=10 | ||
| + | log_file=/var/log/icinga2/compat/icinga.log | ||
| + | log_rotation_method=d | ||
| + | log_archive_path=/var/log/icinga2/compat/archives | ||
| + | date_format=us | ||
| + | </pre> | ||
Aktuelle Version vom 28. Februar 2015, 05:22 Uhr
notwendige pakete
- [thomas@barclay local]$ sudo pacman -S libmariadbclient monitoring-plugins yajl postgresql-libs libmariadbclient cmake boost yajl boost-libs php php-apache gd
icinga2 download, entpacken, bauen und installieren
- [thomas@barclay local]$ curl -O https://aur.archlinux.org/packages/ic/icinga2/icinga2.tar.gz
- [thomas@barclay local]$ tar -xvzf icinga2.tar.gz
- [thomas@barclay local]$ cd icinga2
- [thomas@barclay icinga2]$ makepkg
- [thomas@barclay icinga2]$ sudo pacman -U icinga2-2.2.4-1-x86_64.pkg.tar.xz
icinga-classic-ui download, entpacken, bauen und installieren
- [thomas@barclay local]$ curl -O https://aur.archlinux.org/packages/ic/icinga-classic-ui/icinga-classic-ui.tar.gz
- [thomas@barclay local]$ tar -xvzf icinga-classic-ui.tar.gz
- [thomas@barclay local]$ cd icinga-classic-ui
- [thomas@barclay icinga-classic-ui]$ makepkg
- [thomas@barclay icinga-classic-ui]$ sudo pacman -U icinga-classic-ui-1.12.0-1-x86_64.pkg.tar.xz
user http zur gruppe icingacmd fügen
- [root@barclay icinga2]# gpasswd -a http icingacmd
icingaadmin anlegen
- [root@barclay icinga2]# htpasswd -b -c /etc/icinga2/users icingaadmin 'sysadm'
rechte setzen
- [root@arch ~]# chmod o+rx /etc/icinga2
- [root@arch ~]# chgrp icingacmd /etc/icinga2/users
anpassen des webserver
- [root@barclay ~]# mv /etc/httpd/conf.d/icinga.conf /etc/httpd/conf/extra/icinga.conf
/etc/http/conf/httpd.conf
#dies muss raus ... #LoadModule mpm_event_module modules/mod_mpm_event.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so LoadModule php5_module modules/libphp5.so LoadModule cgi_module modules/mod_cgi.so Include conf/extra/icinga.conf Include "conf/extra/php5_module.conf" php_admin_flag safe_mode Off php_admin_value open_basedir none
feature enablen
- [root@barclay ~]# icinga2 feature enable statusdata compatlog command
anpassen des /etc/httpd/conf/extra/icinga.conf
wir ändern
ScriptAlias /cgi-bin "/usr/share/icinga-classic-ui/sbin"
zu
ScriptAlias /icinga/cgi-bin "/usr/share/icinga-classic-ui/sbin"
und
Alias / "/usr/share/icinga-classic-ui/share/"
zu
Alias /icinga "/usr/share/icinga-classic-ui/share/"
/etc/cgi.cfg
ain_config_file=/etc/icinga2/icinga.cfg standalone_installation=1 physical_html_path=/usr/share/icinga-classic-ui/share url_html_path=/icinga url_stylesheets_path=/icinga/stylesheets http_charset=utf-8 refresh_rate=90 refresh_type=1 escape_html_tags=1 result_limit=50 show_tac_header=1 use_pending_states=1 first_day_of_week=0 suppress_maintenance_downtime=0 action_url_target=main notes_url_target=main read_gzip_logs=0 use_authentication=1 use_ssl_authentication=0 lowercase_user_name=0 authorized_for_system_information=icingaadmin authorized_for_configuration_information=icingaadmin authorized_for_full_command_resolution=icingaadmin authorized_for_system_commands=icingaadmin authorized_for_all_services=icingaadmin authorized_for_all_hosts=icingaadmin authorized_for_all_service_commands=icingaadmin authorized_for_all_host_commands=icingaadmin show_all_services_host_is_authorized_for=1 show_partial_hostgroups=0 show_partial_servicegroups=0 default_statusmap_layout=5 status_show_long_plugin_output=0 display_status_totals=0 highlight_table_rows=1 sort_status_data_by_default=0 use_logging=1 cgi_log_file=/var/log/icinga//icinga-cgi.log cgi_log_rotation_method=d cgi_log_archive_path=/var/log/icinga/ enforce_comments_on_actions=0 send_ack_notifications=1 persistent_ack_comments=0 lock_author_names=1 default_downtime_duration=7200 set_expire_ack_by_default=0 default_expiring_acknowledgement_duration=86400 default_expiring_disabled_notifications_duration=86400 disable_cmd_cgi_csrf_protection=0 set_sticky_acknowledgment=1 tac_show_only_hard_state=0 show_tac_header_pending=1 exclude_customvar_name=PASSWORD,COMMUNITY exclude_customvar_value=secret extinfo_show_child_hosts=0 tab_friendly_titles=1 object_cache_file=/var/cache/icinga2/objects.cache status_file=/var/cache/icinga2/status.dat resource_file=/etc/icinga2/resource.cfg command_file=/var/run/icinga2/cmd/icinga2.cmd check_external_commands=1 interval_length=60 status_update_interval=10 log_file=/var/log/icinga2/compat/icinga.log log_rotation_method=d log_archive_path=/var/log/icinga2/compat/archives date_format=us