When you are going to make changes to the Opmantek application configuration, you should exercise caution as the files are a structured file like JSON which is actually a Perl data structure.  In more recent versions of Opmantek Software we have moved to JSON configuration files.

Before editing

Before editing the file, make a backup, e.g.

cp /usr/local/omk/conf/opCommon.nmis /usr/local/omk/conf/opCommon.nmis.backup.$USER.$PPID

Using .$USER.$PPID, provides a simple unique identifier for getting backups, datestamps are good too, but this is quick and easily repeated for restoration.

After editing

After editing the file, verify the syntax with the following command

perl -c /usr/local/omk/conf/opCommon.nmis

In case of Error

If you get an error message like the following:

String found where operator expected at opCommon.nmis line 5, near "'auth_crowd_password'"
	(Missing semicolon on previous line?)
syntax error at opCommon.nmis line 5, near "'auth_crowd_password'"
opCommon.nmis had compilation errors.

First carefully read the message, this example is quite common, all that is required is to add a comma to the end of the line, but if you can not understand the issue, restore your backup.

Restore your backup

cp /usr/local/omk/conf/opCommon.nmis /usr/local/omk/conf/opCommon.nmis.bad.$USER.$PPID
cp /usr/local/omk/conf/opCommon.nmis.backup.$USER.$PPID /usr/local/omk/conf/opCommon.nmis

Restart the daemon

Most changes to opCommon.nmis will require the daemon to be restarted.

sudo service omkd restart

Other daemons may need to be restarted, for examples see below, typically GUI features require omkd to be restarted and application features required the daemon to be restarted.

Application ConfigurationDaemonCommand to run
opEventsopeventsdsudo service opeventsd restart
opChartsopchartsdsudo service opchartsd restart
opConfigopconfigdsudo service opconfigd restart
opFlow or opFlowSPopflowdsudo service opflowd restart
opTrendoptrendsudo service optrendd restart