The following is the technical information outline of NEMS (Nagios Enterprise Monitoring Server).
Release Date: TBD
Download Latest Version: baldnerd.com/nems
General Application Versions
- Debian: 9 (Stretch)
- Linux Kernel: 4.9.28
- Nagios: 3.5.1
- PHP: 7.0.19
- Apache: 2.4.25
- MariaDB: 10.1.22
- NEMS nConf: 1.4
- Check_MK Multisite:
- nagios-api: 1.2.2
- WMIC: 1.3.14
- WMI Plus: 1.62
Additional Included Software Commands
- Web Browser: w3m
Nagios Live Data Socket
- Located at /var/lib/nagios3/rw/live.sock
- The JSON API is active by default on port 8090.
- If desired, you can disable nagios-api by editing the root cronjob which enables the API at NEMS boot.
Default Passwords (And How To Change Them)
- Web access password is created during initialization. To initialize NEMS 1.2, use the command: sudo nems-init
The easiest way to change this password after NEMS is already initialized, simple re-run the initialization script. If you wish to leave your pi user password as is, just enter the existing password again during init, and you can press CTRL-C when prompted to abort expanding the filesystem (as it’s unnecessary to do it again).
If you’re more adventurous and prefer to do it yourself, you can instead add an htpasswd to /var/www/htpasswd and then change the username in both /etc/nagios3/global/contactgroups.cfg and /etc/nagios3/global/contacts.cfg to give the new user access to Nagios Core. But again, all this stuff is automated with sudo nems-init so you can save yourself some trouble by just doing that.
- NagVis: admin/admin
Login using the default password, and immediately choose User menu→Change Password
- MySQL: root/nagiosadmin
Best leave this as is since changing it would break a lot of stuff. Just never open up your MySQL port to the world, that’s all.
Also important to note that if you manually add any databases or tables, you will lose them if you run a nems-init or a NEMS-Migrator restore. Best leave MySQL alone, and put in a feature request in the comments if you need to add something.
- Quick way to test if WMIC is working from within a NEMS SSH seession:
1/usr/lib/nagios/plugins/check_wmi_plus.pl -H <em>WINDOWSIP</em> -m checkcpu -u "<em>WINDOWSUSER</em>" -p "<em>WINDOWSPASS</em>" -w 20 -c 90
Where WINDOWSIP, WINDOWSUSER and WINDOWSPASS are the actual IP of the Windows computer, and the administrator user/password for that computer.
Run it twice, and then if it’s successful you should see something like this:
1OK (Sample Period 6 sec) - Average CPU Utilisation 1.83%|'Avg CPU Utilisation'=1.83%;20;90;
- WMIC takes up a fair bit of space on the Pi’s SD card, which resulted in NEMS 1.2 minimum system requirement being 8 GB.