DB Installation
This chapter describes the InfluxDB® installation. The installation of the InfluxDB® is included in the WinCC OA installation as described below. Note that there is a DB-specific configuration file called influxdb.conf which will be added to your project configuration directory (<proj_dir>/config) when a new WinCC OA project is created. This is necessary as the location of the InfluxDB® data files is project-specific (<proj_dir>/db/wincc_oa/influx). The file will automatically be adapted to match the location of the created project.
When copying an NGA project to another directory or machine the <proj_dir>/config/influxdb.conf file must be edited manually and the following paths must be adjusted:
dir in [meta]
dir in [data]
wal-dir in [data]
The influxdb.conf file begins with the line: #WINCC_OA_DO_NOT_TOUCH_FILE
This line means that influxdb.conf will not be changed during project registration.
Note that no spaces are permitted before or after #WINCC_OA_DO_NOT_TOUCH_FILE.
A new line must also follow #WINCC_OA_DO_NOT_TOUCH_FILE.
If you are using the InfluxDB® on a distributed or remote system (i.e. multiple WinCC OA systems writing into a single database), this file has to be edited and the line
bind-address = "127.0.0.1:8088"
has to be changed to e.g.
bind-address = "191.168.0.1:8088"
where 191.168.0.1 should be replaced by the real IP address of the machine hosting the InfluxDB®.
By default, startup and shutdown of a local InfluxDB® is handled by the NGA InfluxDB® backend. The DB will be started with project start and shut down when the project is stopped.
You can also install a common InfluxDB® for the use with a local or multiple remote projects which should be started at system boot and stopped when the system is shut down. Local means a "mixed" project where remote projects can access the local InfluxDB®. See the figure "Distributed scenario".
InfluxDB® - Change the Standard Password
The Influx® database installed together with WinCC OA is delivered with a default username and password:
DB username: etm
DB password: etm#123
For security reasons it is highly recommended to change the password before first productive use of the database. Proceed as follows:
- Open a command line prompt.
- Open the influx cli tool "influx.exe" (located in <winccoa installation dir>/bin/influx.exe)
- Enter the following commands (each command completed with <Enter>)
auth
username: etm
password: etm#123
set password for "etm" = '<your new password here>'
quit
After the password is changed in the database, error messages in the WinCC OA log might be shown until the password is also changed as shown below under "Basic configuration".
Read Performance of the InfluxDB®
The query execution time depends on the segment period. We compared query execution times using segment periods of one day and 30 days, leaving everything else identical. We found out that these execution times can differ by a factor of 9 (tested with a bonus value of 1). Longer segment durations significantly improve the read performance. This can be seen in the lower CPU load of the NGA manager and InfluxDB® as well as in the lower memory consumption of the database.