...
Server names need to be lower case with no spaces, e.g. NMIS_Server24 is bad, nmis_server24 is good.
Now set the server name in Config.nmis, search for server_name:
Code Block |
---|
'server_name' => 'nmis_server24', |
Add Servers to Servers.nmis
...
The default entries look like this:
Code Block | ||||
---|---|---|---|---|
| 'nmis1' => {
'community' => 'secret', # this is unused
'name' => 'nmis1', # what to name this server in the GUI
'config' => 'Config.nmis',
'protocol' => 'https',
'port' => '3000', # this should be 3000, the port that omkd runs on
'host' => 'nmis1.domain.com', # the name/ip address omkd will use to connect to the server
'portal_protocol' => 'http', # the next entries define how links in the master will appear, these can be ignored for master entries on slave omkd's
'portal_port' => '80',
'portal_host' => 'nmis1.alternate.com',
'cgi_url_base' => '/cgi-nmis8',
'url_base' => '/nmis8',
'user' => 'nmismst', # the user omkd will connect to this server with
'passwd' => 'C00kb00k' # the password omkd will connect to this server with
},
'nmis2' => {
'community' => 'secret',||||
|
Edit the entry to look like this, in this example the hostname of the slave is "vali":
Code Block | ||
---|---|---|
| ||
'localhost' => { 'name' => 'nmis2localhost', 'config' => 'Config.nmis', 'protocol' => 'httphttps', 'porthost' => '3000localhost', 'hostport' => '192.168.1.423000', 'portal_protocolhost' => 'httpvali.opmantek.com', 'portal_port' => '80443', 'portal_hostprotocol' => 'nmis2https', 'cgi_url_base' => '/cgi-nmis8', 'url_base' => '/nmis8', 'user' => 'nmismstnmis', 'passwd' => 'C00kb00knm1888' } |
Edit the entry to look like this, in this example the hostname of the slave is "vali":
Code Block | ||
---|---|---|
| ||
,
'vali' => {
'community' => 'can_be_empty',
'name' => 'vali',
'config' => 'Config.nmis',
'protocol' => 'http',
'port' => '3000',
'host' => 'vali',
'portal_protocol' => 'http',
'portal_port' => '80',
'portal_host' => 'vali',
'cgi_url_base' => '/cgi-nmis8',
'url_base' => '/nmis8',
'user' => 'nmismst',
'passwd' => 'C00kb00k'
} |
...
Code Block |
---|
'opha_allowed_ips' => ['127.0.0.1', '192.168.1.42', '192.168.2.42'],.42', '192.168.2.42'], |
NB!! : Restart the daemon (needed after any config change)
Code Block |
---|
service omkd restart |
Testing Server Connections
...
Logs can be found in /usr/local/omk/log or also viewed from the GUI at http://server_name:3000/opHA/logs
Troubleshooting
- check the logs
- restart the daemon (required after any config changes)
run daemon from command line and see if the terminal has any helpful errors:
Code Block /usr/local/omk/script/opmantek.pl daemon
Conclusion
After refreshing the web pages on the NMIS Master server you will see the data from the slaves.