meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
groups:mg:private:resonatoren:mg:temperture_monitoring:start [2022/02/15 15:19] – [Mg-Server] fiene | groups:mg:private:resonatoren:mg:temperture_monitoring:start [2024/03/20 09:37] (current) – Admin: Syntax-Update (Migration from deprecated "fontcolor" plugin to "color" plugin) klaus | ||
---|---|---|---|
Line 74: | Line 74: | ||
< | < | ||
- | <fc # | + | <color # |
- | **<fc # | + | **<color # |
- | <fc # | + | <color # |
- | <fc # | + | <color # |
i2c = busio.I2C(board.SCL, | i2c = busio.I2C(board.SCL, | ||
bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, | bmp280 = adafruit_bmp280.Adafruit_BMP280_I2C(i2c, | ||
- | <fc # | + | <color # |
- | <fc # | + | <color # |
</ | </ | ||
Line 246: | Line 246: | ||
- | + | ===== IQ-Server | |
- | ==== IQ-Server ==== | + | Only Admins are allowed to create a database and users on the institute' |
- | Only Admins are allowed to create a database and users on the institute' | + | |
- | ==== Configure CollectD ==== | + | |
You have to write the login data you receive from your admin and the hostname (probably " | You have to write the login data you receive from your admin and the hostname (probably " | ||
'' | '' | ||
Line 256: | Line 254: | ||
The rest of collectd.conf is identical to the one for working with the Mg-Server (only Plugins used are syslog, network and python). You can find more information [[https:// | The rest of collectd.conf is identical to the one for working with the Mg-Server (only Plugins used are syslog, network and python). You can find more information [[https:// | ||
- | ==== Configure InfluxDB | + | |
- | Enter your security level, database name, port, directory of saved data and additional configurations in '' | + | ==== Configuring for collectd |
+ | |||
+ | Stop the influxdb server by running: | ||
+ | < | ||
+ | sudo systemctl stop influxd | ||
+ | </ | ||
+ | |||
+ | The configuration file is ''/ | ||
+ | |||
+ | The config file for the Mg-Server is {{ : | ||
+ | |||
+ | The interesting part is: | ||
+ | < | ||
+ | [[collectd]] | ||
+ | enabled = true | ||
+ | bind-address = ": | ||
+ | database = " | ||
+ | security-level = " | ||
+ | auth-file = "/ | ||
+ | </ | ||
+ | |||
+ | This enables the collectd plugin for influx and writes to the database we specify with credentials required. Communication is done encrypted. | ||
+ | |||
+ | Now create a new file name ''/ | ||
+ | < | ||
+ | magnesium: influxMG | ||
+ | </ | ||
+ | This is the username and password | ||
+ | To load InfluxDB | ||
+ | |||
+ | < | ||
+ | echo $INFLUXDB_CONFIG_PATH / | ||
+ | </ | ||
+ | |||
+ | and start the process with '' | ||
+ | |||
+ | === types.db === | ||
+ | |||
+ | The collectd plugin for InfluxDB requires a types.db document. Copy this from ''/ | ||
+ | |||
+ | === Restarting the server === | ||
+ | |||
+ | Start the server by typing < | ||
+ | |||
+ | To check if there are values being written into the database, use another terminal or ssh to log into influx: | ||
+ | < | ||
+ | influx | ||
+ | </ | ||
+ | and check for values in the database: | ||
+ | < | ||
+ | USE collectd_test | ||
+ | SHOW SERIES | ||
+ | </ | ||
+ | |||
+ | If something is displayed, try listing those values by using | ||
+ | < | ||
+ | SELECT * FROM <name of the time series> | ||
+ | </ | ||
==== Automated Backups ==== | ==== Automated Backups ==== | ||
Line 393: | Line 449: | ||
< | < | ||
- | <fc # | + | <color # |
- | **<fc # | + | **<color # |
- | <fc # | + | <color # |
- | <fc # | + | <color # |
- | <fc # | + | <color # |
- | <fc # | + | <color # |
i2c = busio.I2C(board.SCL, | i2c = busio.I2C(board.SCL, | ||
Line 410: | Line 466: | ||
\\ | \\ | ||
- | **<fc # | + | **<color # |
\\ | \\ | ||
- | **<fc # | + | **<color # |
\\ | \\ | ||
**temperature = (bmp280.temperature + temperature)/ | **temperature = (bmp280.temperature + temperature)/ | ||
- | <fc # | + | <color # |
- | <fc # | + | <color # |
\\ | \\ | ||
- | **<fc # | + | **<color # |
\\ | \\ | ||
- | print(<fc # | + | print(<color # |
sys.exit(1)**\\ | sys.exit(1)**\\ | ||
| | ||
Line 435: | Line 491: | ||
</ | </ | ||
- | CollectD paragraph in influxdb.conf: | ||
- | |||
- | [[collectd]] | ||
- | enabled = true | ||
- | bind-address = ": | ||
- | database = " | ||
- | retention-policy = "" | ||
- | typesdb = "/ | ||
- | security-level = " | ||
- | username = " | ||
- | password = " | ||
| | ||
Line 451: | Line 496: | ||
* if bind address already in use find PID with '' | * if bind address already in use find PID with '' | ||
- | | + | * types db file in / |
- | | + | |
| |