Install Nagios on NethServer

warning nethserver-adagios is available from the Software Center

Nagios Core Install:

I followed this as an instructional with no issues with the distro breaking, you must have a LAMP Server installed:

If not follow this instructional or install from the NethServer Distro

Step 1: Install Required Packages and Dependencies

Install as shown:
yum install httpd php php-cli gcc glibc glibc-common gd gd-devel net-snmp

Next, Start Services:
service httpd start

Step 2: Setup User Accounts
Now create a new nagios user account and setup a password to this account

useradd nagios
passwd nagios

Change the password to from nagios to something more complex as this can be a security hole in the distro as it is shown here, it can be hacked from the outside just with that mistake in place. Write down the password keep it close to you.

Now create a groud for nagios setup “nagcmd” and add nagios user to this group. Also add nagios user in apache group.

groupadd nagcmd
usermod -a -G nagcmd nagios
usermod -a -G nagcmd apache

Step 3: Install Nagios Core Service
After installing required dependencies and adding user accounts. Lets start with Nagios core installation. Download latest nagios core service from official site.This is the latest open source core available.

cd /opt/
tar xzf nagios-4.0.8.tar.gz
cd nagios-4.0.8
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode

Now use below command to setup apache configuration for Nagios installation.

make install-webconf

Step 4: Configure Apache Authentication

We need to setup apache authentication for user nagiosadmin. Do not change this username. else you would required more changes in configuration.

Pay Attention to this line if you have trouble logging in,this sets the password for the login page for Nagios.

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

This will prompt you for the password to the web interface, do not use a common password, use a complex and write it down,login for username is nagiosadmin and your password at the web page prompt to nagios.

Now restart Apache service to make the new settings take effect.

Everytime you change it or make a change to the password, you need to restart Apache as shown

service httpd restart

Step 5: Install Nagios Plugins

After installing and configuring Nagios core service, Download latest nagios-plugins source and install using following commands.

cd /opt
tar xzf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3

Now compile and install nagios plugins

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make install

Step 6: Verify and Start Nagios

Use the following commands to verify nagios install and start nagios core service.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

service nagios start

Also configure nagios service to start on system start

chkconfig --add nagios
chkconfig nagios on

Step 7: Access Nagios in Web Browser


Login Using:nagiosadmin

and the password you created with the
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
this should have been written down, if not run it once more use a complex password, and restart Apache

service httpd restart

You must restart apache each time you change the password:

and there you have it Nagios installed as shown on the page:


Please move to proper area for community users who request Nagios to be installed :slight_smile:

@PParker good job! Please could you tag correctly the code? :smile:
Ehi @nrauso @AbsyntH take a look at this man :wink: what do you think about this howto?

Thank you, my pleasure Alessio, I want to get with coders on whats been done so far and see how we can code all of into the distro… I will try to compile as much as I can …

Great job @PParker!
It’s a good starting point for those who want to test Nagios 4.
Take e minute to look at this how-to: a Nagios 3 flavour solution, I’d like to have your opinion.

If you fancy Nagios 4, then you might be interested in looking at Naemon version:

Let me know! :blush:


Awesome idea, its much shorter and to the point, that works also… :slight_smile:

Hi I would suggest not to compile from source. Just use the rpms.
This it is easier for upgrading. If you compile sourcecode you have to care for updates by yourself.
With install from repositories your nagios will be updated by the repository maintainer.
For that you have replace from wget till make in Step 3 and Step 5 with the following commands.
yum install nagios.x86_64
yum install nagios-plugins
yum install nagios-plugins-all.x86_64


we have already compiled package:

yum install nethserver-adagios

Oh great! Good to know. Thats very very nice. Each day I learn more about nethserver and get confirmed that it is the best product for SBS.


I searched the docs but didn’t find anything about nagios or adagios. This should definitely be added.

in Software Centre:

1 Like

You’re totally right: @davidep, @nrauso can you add please as soon as possible?

@Nas: Nethserver-nethmonitor is the same as nethserver-adagios?

I think a working out of the box nagios install is a big advantage compared to other sbs servers.

You’re right, we’re lacking the documentation. Anyway nethserver-adagios is just a one-click install, then a link to the adagios web interface is available from Dashboard > Applications

Have a look also to

to find the application is not the thing I think.
In my opinion it should be added that you can use nagios with one simple install. So you don’t have to install it from scratch.

Will Nagios/Adagios be installed If I check the “monitoring and inventorying” option?

AFAIK Adagios engine is Nagios, so you can install both with one click :wink:

Ok, perhaps you can change the description to: Monitoring and inventorying with Nagios and OCS

No, nethserver-nethmonitor is a enteprise-only package which ships:

  • Adagios (as community)
  • OCS Inventory (as community)
  • Self-made wizard to configure Windows machine for passive-monitoring (only for enterprise, but not yet done)