Nagmin is webmin module for Nagios and is a versatile tool that manages and compliments Nagios. Unfortunately, Nagios will only support the Nagios 1.x versions and not the 2.x versions for the reason that the MySQL database support is no more available on Nagios 2.x versions. Nagmin had its very active work done sometime in 2004 and unfortunate it is not taken any further. However, in its last available state, it is still a very powerful tool to administer Nagios. Being an Admin myself, I wouldn’t prefer a different admin tool than Nagmin for Nagios.
Installation of Nagmin requires the following installed on the server:
- An installed working Nagios 1.x version
- An installed working MySQL 3.0 or higher (Latest version 5.0)
- An installed working NMap (Latest Version 4.11)
- An installed working Net-SNMP (Latest Version 5.3.1)
- An installed working RRDTool (Latest Version 1.2.15)
Installation of Nagmin is a two step procedure. First install Webmin and then Nagmin
Install WEBMIN
Download the latest version of Webmin from
The latest version when this article is written is 1.300 and can be downloaded from here:
http://prdownloads.sourceforge.net/webadmin/webmin-1.300.tar.gz
Once downloaded,
Untar the files using,
# tar -zxvf webmin-1.300.tar.gz
Change to the extracted Directory
# cd webmin-1.300
Run the setup script as follows,
# ./setup.sh /usr/local/webmin
Accept the defaults when prompted and this will install Webmin in /usr/local/ directory.
Now launch
http://<IP or hostname>:10000/
This should launch Webmin installed on the server.
Logon as the admin user specified during installation and check webmin works OK on the server.
Now, proceed to install Nagmin.
Install Nagmin
Download Nagmin-2.1.0 from the following sourceforge website:
http://downloads.sourceforge.net/nagmin/nagmin-2.1.0.tar.gz?modtime=1078099200&big_mirror=0
NOTE: Do not try to install Nagmin 2.2 at the first place as it does not have the setup script that runs the various SQL scripts and creates the Nagios Database and the tables for the Database.
Once downloaded, untar the nagmin-2.1.0.tar.gz
# tar -zxvf nagmin-2.1.0.tar.gz
Move the directory nagmin-2.1.0 to /usr/local/ and rename it as nagmin
# mv nagmin-2.1.0 /usr/local/nagmin
Now, launch the webmin to add the nagmin as a webmin module.
Launch
http://<IP or HOSTNAME>:10000
Login as the admin user.
Click Webmin and then Webmin Configuration.
Click Webmin modules.
Select “from local file” option and and type the location as
/usr/local/nagmin/nagmin-2.1.0.wbm
and click Install.
This should install the Nagmin module and allow a link to launch Nagmin. Alternatively, click Servers then select “Nagmin Nagios Monitoring”
Now, it is advisable to upgrade to Nagmin-2.2.0 as this fixes a few installer errors in Nagmin-2.1.0
Upgrade Nagmin-2.1.0 to Nagmin -2.2.0
To upgrade, first make a backup of the /usr/local/nagmin directory:
# mv /usr/local/nagmin /usr/local/nagmin_bkp
Now, download Nagmin-2.2.0 from
http://downloads.sourceforge.net/nagmin/nagmin-2.2.0.tar.gz?modtime=1083196800&big_mirror=0
untar the nagmin-2.2.0.tar.gz
# tar -zxvf nagmin-2.2.0.tar.gz
Move the directory nagmin-2.2.0 and to /usr/local/nagmin directory
# mv nagmin-2.2.0 /usr/local/ nagmin
Once again, launch the webmin to add the nagmin as a webmin module.
Launch
http://<IP or HOSTNAME>:10000
Login as the admin user.
Click Webmin Configuration.
Click Webmin modules.
Select “from local file” option and and type the location as
/usr/local/nagmin/nagmin-2.2.0.wbm
and click Install.
This should install the updated Nagmin module (2.2.0) and allow a link to launch Nagmin. Alternatively, click Servers then select “Nagmin Nagios Monitoring”
Thats the deal… Have fun with Nagios Monitoring with Nagmin Administration.
I’ve just upgraded to Nagios 3.0.1.
Is there any version of nagmin or similar that supports lates Nagios version?
The MySQL client program /usr/bin/mysql does not appear to be the correct version. Webmin only supports MySQL versions 3 and above…
I am getting this error when run “Nagmin Nagios Monitoring” can anybody help me in this.
Akhil
When i click on this option in webmin “NagMIN Network Monitoring” it will ask user name and password of mysql root user and password.
“Webmin needs to know your MySQL administration login and password in order to manage your database. Please enter your administration username (usually root) and password below.”
i am putting mysql root user name and password but it is not accepting when i use mysql root user name and password on ternimal it will accept my username and password.
“Login failed : Incorrect administration username or password”
Why this error is coming can you guide me what is the solution.
Hi Akhil
I’ve had the same issue as you. Nagmin doesn’t recognize the newer version of the mysql database. I’ve found the solution here http://opensource-2u.blogspot.com/2007/08/how-to-install-network-monitoring-tool.html
Its unfortunate, Nagmin development stopped way back in 2003 and with the architecture change in nagios from 2.x onwards, it doesnt support nagios 2.x 3.x versions
The Error
1. (Error: version issue):
Some error found when your login webmin –> Server –> nagMIN Network Monitoring.
Error message:
The MySQL client program /usr/bin/mysql does not appear to be the correct version. Webmin only supports MySQL versions 3 and above.
The command /usr/bin/mysql -V returned :
/usr/bin/mysql Ver 14.12 Distrib 5.0.22, for redhat-linux-gnu (i686) using readline 5.0
Suggested fix:
open terminal and type vi /usr/libexec/webmin/nagmin/index.cgi
find “distrib” and add “| 5” after 4 at same line
save and quit the vi.
2. error found when your login webmin –> Server –> nagMIN Network Monitoring –> in column System Databases –> nagios
error message:
“Error – Perl execution failed
Can’t use an undefined value as a HASH reference at /path/to/mysql.pm line 113″
Suggested fix:
Location mysql.pm on Suse /usr/lib/perl5/vendor_perl/5.8.8/i586-linux-thread-multi/DBD/mysql.pm
At around line 109 of mysql.pm:
————————————
# Avoid warnings for undefined values
$username ||= ”;
$password ||= ”;
# create a ‘blank’ dbh
my($this, $privateAttrHash) = (undef, $attrhash);
$privateAttrHash = { %$privateAttrHash,
‘Name’ => $dsn,
‘user’ => $username,
‘password’ => $password
};
————————————-
Needs to be changed to
————————————-
# Avoid warnings for undefined values
$username ||= ”;
$password ||= ”;
$attrhash ||= {};
# create a ‘blank’ dbh
my($this, $privateAttrHash) = (undef, $attrhash);
$privateAttrHash = { %$privateAttrHash,
‘Name’ => $dsn,
‘user’ => $username,
‘password’ => $password
};
Finish.