Last week a simple scenario to develop and evaluate the CM8 monitoring was set up. This week the system was extended by attaching a second, more complex CM8 system. This system has multiple resource managers in various layouts, multiple item types, and already has some data loaded.
Support for multiple CM8 systems is currently out of scope of the project. Therefore a simple approach was chosen where a separate Influx database was set up for the new system. This way no tags have to be added to the measurements in order to distinguish the two systems. A copy of a dashboard was created that uses the new database. An alternative is to add a variable to the dashboard that allows the user to select the datasource, and hence the CM8 system he is interested in.
The sensor that extracts the statistics from the library server database and sends them to the Influx database had all its parameters hard-coded. The necessary arguments were now added to the python script. And the docker image was changed so the arguments can be passed to the script.
$ docker run -it --rm cm8_monitoring --help usage: cm8-influxdb.py [-h] [--db2-host DB2_HOST] [--db2-port DB2_PORT] [--db2-database DB2_DATABASE] [--db2-user DB2_USER] [--db2-password DB2_PASSWORD] [--influx-host INFLUX_HOST] [--influx-port INFLUX_PORT] [--influx-user INFLUX_USER] [--influx-password INFLUX_PASSWORD] [--influx-database INFLUX_DATABASE] optional arguments: -h, --help show this help message and exit --db2-host DB2_HOST --db2-port DB2_PORT --db2-database DB2_DATABASE --db2-user DB2_USER --db2-password DB2_PASSWORD --influx-host INFLUX_HOST --influx-port INFLUX_PORT --influx-user INFLUX_USER --influx-password INFLUX_PASSWORD --influx-database INFLUX_DATABASE
The way to attach different systems implemented here allows to easily evaluate the dashboards in different environments without the overhead of a more complex data model.