Index
Overview
In addition to discovering network devices via the Administration Tool or the Statseeker RESTful API, you are able to add devices to Statseeker directly from the Statseeker server command line interface (CLI).
For details on accessing the CLI, see Statseeker Server CLI
SNMP Discovery – Single Device
- Ensure that the community string for the device is in the community list (Administration Tool > Network Discovery > SNMP Communities)
- Enter the following command on the Statseeker server CLI
nim-discover -i <ipaddress>
Example:
# nim-discover -i 10.100.54.252
The CLI will display a log of the discovery process, the content of which is identical to the log presented via the GUI.
SNMP Discovery – Multiple Devices
This method is typically used when synchronizing Statseeker with an external configuration database.
- Update your Hosts file
- via the Administration Tool, see Hosts File for details
- Via the CLI, edit /home/statseeker/nim/etc/hosts.cfg
The syntax for the Hosts file is the same in either case <ipaddress> {one or more spaces}
- Synchronize the hosts file
# nim-cfg-sync-hosts
- Run discovery
# nim-discover -h
Add Ping-Only Devices
- Create the shell script file, opening it in vi
# vi /home/statseeker/addPingOnly.sh
- Press i, to enable ‘insert’ mode
- Update the following code to reflect the REMOTE_USER and REMOTE_PASSWORD relevant to your installation
- Copy the updated code and paste it into the script file
#!/bin/sh export CONTENT_LENGTH=$(perl -e "print -s q/pingDevices.txt/"); export REQUEST_METHOD=POST export REMOTE_USER="admin" export REMOTE_PASSWORD="MyAdminUserPassword" /usr/local/statseeker/ss/cgi/nim-add-ping-device < pingDevices.txt
- Save the script file with :wq!
- Ensure that the shell script has execute permission assigned, add it if not
Example:
$ ls -l $ chmod u+x addPingOnly.sh
- Create a plain text file in the same directory as the script, giving it the same name as that specified in the script contents (e.g. pingDevices.txt):
# vi /home/statseeker/pingDevices.txt
The content of the file should be a list of devices and device names similar to that provided for a hosts file
Example:
text=10.1.1.1 deviceName1 10.2.2.2 deviceName2 10.2.2.3 deviceName3 10.2.2.4 deviceName4 &override=on
- Save the script file with :wq!
- Run the script
# ./addPingOnly.sh