Adagios installation on NethServer 6.x

UPDATE 2015-08-25
The package nethserver-adagios is now available from nethserver-updates repository. To install it type:

yum install nethserver-adagios

Now you have to use NethServer admin credentials to access Adagios web interface!

Here is my copy-n-paste-how-to (at least i hope so!! :slight_smile: ) for Adagios installation on NethServer: test it and let me know!

source: https://github.com/opinkerfi/adagios/wiki/Install-guide

  1. Install prerequisites for NethServer:

    yum install nethserver-httpd -y

  2. Install and disable additional repos (to prevent unwanted updates):

    yum localinstall http://opensource.is/repo/ok-release.rpm
    yum --enablerepo=extras install epel-release
    sed -i ā€˜s/enabled=1/enabled=0/ā€™ /etc/yum.repos.d/ok.repo
    sed -i ā€˜s/enabled=1/enabled=0/ā€™ /etc/yum.repos.d/epel.repo

  3. Change releasever ref into ok repo url (mandatory or installation fails):

    sed -i ā€˜s/rhel$releasever/rhel6/ā€™ /etc/yum.repos.d/ok.repo

  4. Procede with installation:

    yum --enablerepo=ok update ok-release -y

    yum --enablerepo=ok*,epel install pnp4nagios mk-livestatus nagios
    git adagios okconfig acl python-setuptools nagios-plugins-all -y

  5. Lets make sure adagios can write to nagios configuration files, and that it is a valid git repo so we have audit trail:

    cd /etc/nagios/
    git init
    git config user.name ā€œyournameā€
    git config user.email ā€œyourname@yourdomain.comā€
    git add *
    git commit -m ā€œInitial commitā€

  6. Make sure nagios group will always have write access to the configuration files:

    chown -R nagios /etc/nagios/* /etc/nagios/.git
    setfacl -R -m group:nagios:rwx /etc/nagios/
    setfacl -R -m d:group:nagios:rwx /etc/nagios/

  7. By default objects created by adagios will go to /etc/nagios/adagios so make sure that this directory exists and nagios.cfg contains a reference to this directory:

    mkdir -p /etc/nagios/adagios
    pynag config --append cfg_dir=/etc/nagios/adagios

  8. The status view relies on broker modules livestatus and pnp4nagios, so lets configure nagios.cfg to use those:

    pynag config --append ā€œbroker_module=/usr/lib64/nagios/brokers/npcdmod.o \
    config_file=/etc/pnp4nagios/npcd.cfgā€

    pynag config --append ā€œbroker_module=/usr/lib64/mk-livestatus/livestatus.o
    /var/spool/nagios/cmd/livestatusā€

    pynag config --set ā€œprocess_performance_data=1ā€

  9. Add nagios to apache group so it has permissions to pnp4nagiosā€™s session files:

    usermod -G apache nagios

  10. Define new services according to NethServer default (see developer manual)

    config set nagios service status enabled
    mkdir -p /etc/e-smith/db/configuration/defaults/nagios
    echo ā€œserviceā€ > /etc/e-smith/db/configuration/defaults/nagios/type
    echo ā€œenabledā€ > /etc/e-smith/db/configuration/defaults/nagios/status

    config set npcd service status enabled
    mkdir -p /etc/e-smith/db/configuration/defaults/npcd
    echo ā€œserviceā€ > /etc/e-smith/db/configuration/defaults/npcd/type
    echo ā€œenabledā€ > /etc/e-smith/db/configuration/defaults/npcd/status

    config set nrpe service status enabled TCPPort 5666 access public
    mkdir -p /etc/e-smith/db/configuration/defaults/nrpe
    echo ā€œserviceā€ > /etc/e-smith/db/configuration/defaults/nrpe/type
    echo ā€œ5666ā€ > /etc/e-smith/db/configuration/defaults/nrpe/TCPPort
    echo ā€œenabledā€ > /etc/e-smith/db/configuration/defaults/nrpe/status
    echo ā€œpublicā€ > /etc/e-smith/db/configuration/defaults/nrpe/access

  11. Signal new services and start them:

    signal-event firewall-adjust

    service nagios restart
    service httpd restart
    service npcd restart

    signal-event runlevel-adjust

ā€¦all done! Now you can access Adagios form the default url:

http://server.domain/adagios/status

using default credentials (nagiosadmin/nagiosadmin)

5 Likes

Searching ā€œadagios installationā€ on Google. Good work @nrauso !

1 Like

iā€™ve just installed nethserver-adagios (good work ppl) , i see in the nagios tab

NagiosĀ® Coreā„¢
Version 3.5.1
August 30, 2013

Update RequiredYour installation of Nagios Core 3.5.1 is outdated and should be upgraded. The latest version of Nagios Core is 4.1.1 was released on 2015-08-19.

itā€™s safe do the upgrade?

AFAICT, last version of nagios (4.x) is not yet available in rpm packages for RH/centos and so onā€¦

if you search with google ā€œNagios cenots6ā€ youā€™ll find that ATM the only way to install it is from sources, and IMO thatā€™s not an option

BTW, Iā€™m running adagios/nagios 3.5.1 on my NS (installed from rpms, following an howto) and everything is working flawlessy

youā€™d try to download nagios3 src rpm, and try to recompile it using nagios4 sourcesā€¦ maybe it wonā€™t solve your problem, but at least youā€™ll learn something :wink:

./configure
make && make install

you make me move remembering my slackware nights

Hi to all
Iā€™m trying to install Adagios on NS7 and i found the instructions at: https://github.com/opinkerfi/adagios/wiki/Naemon-and-Adagios-Install-Guide
I did the first part of the installation but I canā€™t do the following instruction:
git config user.name "My User"
The SO respond:
error: could not lock config file .git/config: No such file or directory
Could you help me?
Thank you.

Try to execute ā€œgit initā€ as first step.

Perfetto!
Grazie Giacomo

Is the nethserver-adagios module going to be officially ported to NS7?

No itā€™s not (at least until we find a valid alternative):
http://docs.nethserver.org/en/v7b/release_notes.html#discontinued-packages

Thanks Giacomo,
How about Naemon with Adagios? I really liked the way you could install adagios from software center :yum:

This is much more likely to happen. I know @nrauso alredy did some test :slight_smile:

Good news here: Adagios installation on NethServer 7.x :slight_smile: