...
**When the installer has completed its work you should be set to start using NMIS. As an initial check of NMIS you should likely try the command line tool nmis.pl
and then the NMIS web GUI:
tool "nmis-cli" and then the NMIS web GUI:
Code Block |
---|
cd /usr/local/nmis9/
sudo ./bin/nmis-cli act=schedule job.type=selftest job.force=1
Output similar to:
[root@omk-vm9-centos7 nmis9]# ./bin/nmis-cli act=schedule job.type=selftest job.force=1
Job 602d1b6596c8066f7f538765 created for type selftest.
Validate Job:
**selftest was run and then we checked for active jobs with the "act=list-schedules" and it will report active items**
[root@omk-vm9-centos7 nmis9]# ./bin/nmis-cli act=list-schedules
Active Jobs:
Id When Status What Parameters
602d1b6596c8066f7f538765 Wed Feb 17 13:34:29 2021 In Progress since Wed Feb 17 13:34:33 2021 selftest
Queued Jobs:
Id When Priority What Parameters
No queued jobs at this time.
Automatic Schedule:
Operation Frequency
Escalations 1m30s
Metrics Computation 2m
Configuration Backup 1d
Old File Purging 1h
Database Cleanup 1d
Selftest 15m
File Permission Test 2h
[root@omk-vm9-centos7 nmis9]# ./bin/nmis-cli act=list-schedules
No activities scheduled or in-progress.
Automatic Schedule:
Operation Frequency
Escalations 1m30s
Metrics Computation 2m
Configuration Backup 1d
Old File Purging 1h
Database Cleanup 1d
Selftest 15m
File Permission Test 2h
[root@omk-vm9-centos7 nmis9]# date
Wed Feb 17 13:35:19 UTC 2021
|
This command below will do a quick check of directory and file existence as well as ownership and permissions.
Code Block |
---|
cd /usr/local/nmis9/ sudo ./bin/nmis-cli act=fixperms |
Now, fire up your favourite Web browser and surf to your server. The primary url for NMIS is http://<yourhostname-or-ip>/nmis9/
, and that page shows both a link to the NMIS dashboard and the online NMIS documentation.
...
iptables -L
on your NMIS server, as well as /etc/selinux/config
and the exit code of selinuxenabled
.SNMPD, Net-SNMP and collecting stats of the NMIS server itself
NMIS8 NMIS9 ships with one default node configured for collection, primarily to prove it is all working. This node is called localhost
and NMIS will collect statistics from your NMIS server using SNMP - if an SNMP agent is available, or just Ping statistics if not.
However, the installer does not automatically configure this local Net-SNMP daemon; if you would like to collect the NMIS server's statistics follow the instructions below - otherwise you're done with the installation.
You will likely want to consult and use the example configuration for Net-SNMP's snmpd
, which ships with NMIS in the file <nmisdir>/install/snmpd.conf
.
Because the installer has installed Net-SNMP for you already, you only need to backup its default config and move in the NMIS example one. You should very much modify this config to secure the SNMP read access according to your organisation's security policy!
Code Block |
---|
cd /usr/local/nmis9 mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.orig mv /etc/snmp/snmptrapd.conf /etc/snmp/snmptrapd.conf.orig cp conf-default/snmpd/snmpd.conf /etc/snmp/snmpd.conf cp conf-default/snmpd/snmptrapd.conf /etc/snmp/snmptrapd.conf cp conf-default/snmpd/snmptrapd.options /etc/sysconfig/snmptrapd # for CentOS/Red Hat only |
Debian/Ubuntu
The last command in the list above will fail as there is no /etc/sysconfig directory on this platform. Instead the snmptrap service is started by the snmpd service, and is enabled by updating the file /etc/default/snmpd
with the following line:
Code Block |
---|
TRAPDRUN=yes |
Auto Start SNMP Daemons
Ensure that you tell your system to start snmpd
and snmptrapd
automatically on boot.
CentOS/RedHat 6
Code Block |
---|
# as root /sbin/chkconfig snmpd on /sbin/chkconfig snmptrapd on |
CentOS/RedHat 7
Code Block |
---|
# as root systemctl enable snmpd.service systemctl enable snmptrapd.service |
Debian/Ubuntu
Code Block |
---|
# as root update-rc.d snmpd defaults update-rc.d snmptrapd defaults service snmpd start service snmptrapd start |
Run a Test Update
Once your local snmpd
is running, you should run a test update operation:
Code Block |
---|
sudo /usr/local/nmis9/bin/nmis-cli act=schedule job.type=update job.node=localhost |
The output will look similar to this example:
Code Block |
---|
[root@omk-vm9-centos7 bin]# /usr/local/nmis9/bin/nmis-cli act=schedule job.type=update job.node=localhost Job 602c2acf7c3f4515dbebdb35 created for node localhost (528a065e-2afe-4ca4-8cf7-7e032ce3e61e) and type update. |
As the installer has already installed the default NMIS cron schedule NMIS will poll and collect all known nodes every 5 minutes. You can now either run a test collect or sit back and wait for NMIS to do the next one automatically:
Code Block |
---|
sudo /usr/local/nmis9/bin/nmis-cli act=schedule job.type=collect job.node=localhost |
After that collect operation has concluded you should see the newest data for your NMIS server on the NMIS dashboard.
Acces NMIS and Start using and configuring
NMIS8 - A Quick Getting Started Guide
Advanced Installer Use
Access the source without installation
If you want to read the installer source, or access the distributed files without actual installation, then simply pass the arguments –-keep --noexec
to the run file invocation, e.g.
Code Block |
---|
sh ./nmis<version>.run --keep --noexec |
This tells the self-extracting installer to just unpack the archive (into the directory nmis<version>
) and to not start the interactive installer component.
Install in a non-standard location
If you want the installer to install NMIS into a non-standard directory, change to invocation to include site=<somepath>
(after a mandatory --
separator), e.g.
Code Block |
---|
sh ./nmis<version>.run -- site=/opt/nmis |
Info |
---|
For more information regarding installing NMIS in a non default location please review NMIS8 - Installing NMIS in a Non Standard Location Please remember to replace NMIS8 versions with NMIS9 in the directory setup. |
Only check and install dependencies
If you don't want to perform the actual installation but only perform the software dependency resolution and check and install any prerequisites, use listdeps=true
(after a --
separator), e.g.
Code Block |
---|
sh ./nmis<version>.run -- listdeps=true |
Non-interactive, automatic installation/upgrade
If your NMIS was downloaded after 2016-07-11, then the installer also offers a non-interactive automatic mode, where all the normal questions are automatically answered with the default choice.
To use this mode, simply pass in -y
(somewhere after the mandatory --
separator), e.g.
Code Block |
---|
sh ./nmis<version>.run -- -y # recommended for safety: wrapped in screen with output logging on screen -L sh ./nmis<version>.run -- -y |
Installation Log
The installer creates a log of all the operations that it performs, which is saved in the main NMIS installation directory as install.log
. Subsequent NMIS upgrades add extra information to that log file, but the installer always starts its work with an initial log message that indicates when an installation/upgrade was performed. It is safe to delete the installer log file if you don't want to keep old installation and upgrade info.
Historical Manual Installation Instructions
The old manual installation instructions are available for your perusal on this page. Please note that these old instructions are no longer updated and will definitely diverge more or less from current best practice! (which is to let the installer handle the installation intricacies on your behalf).