44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
### Configuring taosAdapter
|
|
|
|
Method to configure taosAdapter to receive icinga2 data:
|
|
|
|
- Enable the configuration item in the taosAdapter configuration file (default location /etc/taos/taosadapter.toml)
|
|
|
|
```
|
|
...
|
|
[opentsdb_telnet]
|
|
enable = true
|
|
maxTCPConnections = 250
|
|
tcpKeepAlive = false
|
|
dbs = ["opentsdb_telnet", "collectd", "icinga2", "tcollector"]
|
|
ports = [6046, 6047, 6048, 6049]
|
|
user = "root"
|
|
password = "taosdata"
|
|
...
|
|
```
|
|
|
|
The default database name written by taosAdapter is `icinga2`, but you can also modify the dbs item in the taosAdapter configuration file to specify a different name. Fill in user and password with the actual TDengine configuration values. taosAdapter needs to be restarted after modifications.
|
|
|
|
- You can also use taosAdapter command line parameters or set environment variables to enable taosAdapter to receive icinga2 data, for more details please refer to the taosAdapter reference manual
|
|
|
|
### Configuring icinga2
|
|
|
|
- Enable icinga2's opentsdb-writer (reference link https://icinga.com/docs/icinga-2/latest/doc/14-features/#opentsdb-writer)
|
|
- Modify the configuration file `/etc/icinga2/features-enabled/opentsdb.conf` filling in \<taosAdapter's host> with the domain name or IP address of the server running taosAdapter, \<port for icinga2> with the corresponding port supported by taosAdapter for receiving icinga2 data (default is 6048)
|
|
|
|
```
|
|
object OpenTsdbWriter "opentsdb" {
|
|
host = "<taosAdapter's host>"
|
|
port = <port for icinga2>
|
|
}
|
|
```
|
|
|
|
Example file:
|
|
|
|
```
|
|
object OpenTsdbWriter "opentsdb" {
|
|
host = "127.0.0.1"
|
|
port = 6048
|
|
}
|
|
```
|