Configuring Monitored Parameters for a Database
The service can write parameters (defined within a service class) to an SQL database for trend analysis over time or to the messaging bus for real-time monitoring.
This tutorial describes how to configure monitored parameters to write to a database. Supported databases are: MySQL, PostgreSQL, or Oracle.
Prerequisite
Complete the tutorial Provisioning Devices 1: Basic Setup.
Enable Parameter Monitoring Using ACS CLI
Log into the ACS CLI and set values for the following parameters.
Parameters
$ acscli -c MONITORED_PARAMETER_ENABLED=true
$ acscli -c MONITORED_PARAMETER_WRITE_TO_DB=true
$ acscli -c MONITORED_PARAMETER_WRITE_TO_MESSAGE_BUS=false
$ acscli -c MONITORED_PARAMETER_DATABASE_VENDOR=<database-type>
$ acscli -c MONITORED_PARAMETER_DATA_SOURCE=<username>/<password>@<ip-address>:<port>/<database-name>
Where:
<database-type> is one of: MySQL, PostgreSQL, or Oracle
<database-name> is the name of the database used to store the monitored parameters
Note: For information about using the CLI, refer to the ACS
CLI reference.
Create a Device Group for Monitoring
Create a device group and add the devices on which you want to monitor parameters to it.
Create a Service Class with Monitored Parameters
Create a service class that includes monitored parameters.