Thruk interface for nagios.
Enable var:
# In your group_vars/thruk_group/vars.yml
thruk_copy_backgrounds: true
Wherever your site.yml (playbook) is, create subfolder: thruk_company_logos, with these files:
- logo_thruk.png 246x89
- logo_thruk_small.png 139x50
- logo_thruk_mid.png 130x40
It will replace thruk logo with yours own.
Same if you want to have copied background for "panorama view" inside thruk, with folder: thruK_backgrounds
Add any .png file here, it will be available as background for your panoramio.
For redhat it requires EPEL repo added already. For Ubuntu it adds the required repository
Define the variables described below.
ansible-galaxy install
ansiblecoffee.nagios_server
ANXS.mysql
Ubuntu: ok RedHat: Not yet
mysql_root_password: thruk_mysql_password:
ANXS.Mysql
ansiblecoffee.nagios_server
Minimum usage:
- hosts: servers
roles:
- ANXS.mysql
- nagios_server
- nagios_server_thruk
Complete list of roles for your site:
- name: apply Nagios settings
hosts: nagios_servers
become: yes
become_method: sudo
pre_tasks:
- name: installing python-3 mysql libraries
apt: name=python3-mysqldb state=present
when: ansible_os_family == 'Debian'
roles:
- role: geerlingguy.mysql
tags:
- mysql
- nagios
- role: ansible-role-nagios
tags:
- nagios
- role: coffeeitworks.ansible_nagios4_server_config
tags:
- nagios
#- role: nagios_server_plugins
# tags:
# - nagios
#- role: nagios_server_pnp4nagios
# tags:
# - nagios
- role: ansible_nagios4_server_thruk
tags:
- nagios
#- role: postfix_client
# tags:
# - postfix_client
# Additional tags: role/tag
# nagios_server - config_nagios
# nagios_server - nagios_server_main_config
# nagios_server - config_nagios_cron
# nagios_server_plugins - config_nagios_plugins
# nagios_server_plugins - test_nagios_plugins
# nagios_server_pnp4nagios - test_nagios_pnp4nagios
# nagios_server_thruk - config_nagios_thruk_cron
# nagios_server_thruk - test_nagios_thruk
# nagios_server_thruk_git - config_nagios_thruk_git_cron
We prefer to tag roles instead of tasks (see above), but sometimes few tasks are useful to have a tag when you implement a small change.
config_nagios_thruk_cron
test_nagios_thruk
BSD
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
tar -cf backupnagioshistory.tar /var/log/nagios3 # backup nagios3 logs
tar -xf backupnagioshistory.tar -C / # Restore nagios3 logs
thruk -a logcacheimport --local /var/log/nagios3/archives/*
thruk -a logcacheupdate --local /var/log/nagios3/nagios.log
Check more info at: http://www.thruk.org/documentation/logfile-cache.html
tar -cf pnp4nagiosbackupfile.tar /usr/local/pnp4nagios/var # Backup the graphs
tar -xf pnp4nagiosbackupfile.tar / # Restore the graphs