Prerequisites
A working copy of NMIS that opExport can read and export the data from
Installation Steps
Common Steps
- copy the tarball to the server, into your users home directory
untar the file into a location of your choice, the default location is /usr/local/opExport
- copy the config files
cd /usr/local tar xvf ~/opExport-x86_64-1.0.0.tar.gz cd opexport cp ./install/opCommon.nmis ./conf/opCommon.nmis cp install/opexport.init.d /etc/init.d/opexport chkconfig --add opexport chown -R nmis:nmis /usr/local/opexport
- Set the key that the daemons will use to verify each other, opexport_connection_key, in opCommon.nmis. The default key is opexport_connection_key=key123.
- make sure the os_group and os_username in conf/opCommon.nmis exist and match the username used. (default is nmis/nmis)
Additional Steps for the MySQL Database server
copy the schema files to the conf directory, this should ONLY be done on the MySQL server, not on the NMIS servers
cd /usr/local/opExport cp ./install/schema_set.json ./config/ cp ./install/export-* ./config/ chown -R nmis:nmis /usr/local/opexport
- Add the mysql connection options to conf/opCommon.nmis, the defaults are listed below, note: Do this ONLY on the server hosting the MySQL, the daemons on the NMIS servers do not use these options
'opexport' => { 'opexport_sql_db_host' => 'localhost', 'opexport_sql_db_port' => '3306', 'opexport_sql_db_name' => 'opexport', 'opexport_sql_db_user' => 'opexport', 'opexport_sql_db_password' => '42opexport42', }
Start the opExport daemon
This will need to be done on all of the servers, e.g. the MySQL Database server as well as all the NMIS servers that will be exporting data
service opexport start
http://your.server.names.or.ip:3000/opExport/?opexport_connection_key=key123
Configure the daemons that will export data
The server that holds the MySQL Database holds the master copy of the schema, in order for an NMIS server to export it's daemon requires a schema to be pushed to it.
Each NMIS server that will export it's data must be able to access the MySQL server with a simple host name (no dots), so you may need to edit /etc/hosts and add entries to allow this.
Additionally, the MySQL server requires the same for all the NMIS servers that will push to it, so again you may need to add them to it's /etc/hosts file.
Next, check that the MySQL server has a schema configured. In a web browser load:
http://your.MySQL.server.name.or.ip:3000/opExport/schemas?opexport_connection_key=key123
For each NMIS server you wish to have export you need to push the schema, in a web browser load:
http://your.MySQL.server.name.or.ip:3000/opExport/schemas/push/NMIS_Server_Name1?opexport_connection_key=key123 http://your.MySQL.server.name.or.ip:3000/opExport/schemas/push/NMIS_Server_Name2?opexport_connection_key=key123 http://your.MySQL.server.name.or.ip:3000/opExport/schemas/push/NMIS_Server_Name3?opexport_connection_key=key123
You can now verify that each of the NMIS servers have the schema:
http://your.NMIS.server.name1.or.ip:3000/opExport/schemas?opexport_connection_key=key123
Transferring Data
There are two ways to transfer, the MySQL server can "pull" the data, or the NMIS server can "push" the data.
Data to be pushed is available from these schemas:
diskIOTable
ciscoConfig
interface
interfaceStatus
nmisConfig
nodeStatus
services
storage
system
Replace "schema_to_push" with one of the above schema names.
To pull:
http://your.MySQL.server.name.or.ip:3000/opExport/pull/NMIS_server_name/schema_to_push/sql?opexport_connection_key=key123
To push:
http://your.NMIS.server.name.or.ip:3000/opExport/push/MySQL_server_name/schema_to_push/sql?opexport_connection_key=key123
To run push or pull commands on the server you can also issue them directly to the daemon pl file:
cd /usr/local/opexport/script; ./opmantek.pl get /opExport/push/MySQL_server_name/interface/schema/sql; ./opmantek.pl get /opExport/pull/NMIS_server_name/interface/schema/sql; cd -;
Monitoring opExport Activity
Activity can be monitored by viewing the logs, to work properly you will need a browser that supports websockets (Chrome, Firefox, or IE 10)
http://your.MySQL.server.name.or.ip:3000/opExport/logs
This page will stay connected to the server and receive info from the server as it happens
Error checking
Logs are located in /usr/local/opexport/log. opDaemon.log will show errors that have occured, opLog_plugin.log will show timing.