opengeminiWrite
x/opengeminiWrite
Component: v0.24.0+ OpenGemini write client. Writes the current message payload to the OpenGemini server.
# Configuration
This component allows the reuse of shared connection clients through the server
field. See Component Connection Reuse for reference.
Field | Type | Description | Default |
---|---|---|---|
server | string | OpenGemini service address, format: hostname:port, multiple servers separated by commas | None |
database | string | Database, can use component configuration variables | None |
username | string | Username | None |
password | string | Password | None |
token | string | Authentication token, if Token is not empty, use Token for authentication | None |
# Writing Format
# JSON Format
The message payload format must be JSON: msg.DataType = types.JSON
The writing format supports multiple or single entries, for example:
{
"Fields": {
"value": 98.6
},
"Measurement": "cpu_load",
"Tags": {
"host": "server01"
},
"Time": "2024-09-01T13:41:27.3142051+08:00"
}
2
3
4
5
6
7
8
9
10
[
{
"Fields": {
"value": 98.6
},
"Measurement": "cpu_load",
"Tags": {
"host": "server01"
},
"Time": "2024-09-01T13:41:27.3142051+08:00"
},
{
"Fields": {
"value": 91.6
},
"Measurement": "cpu_load",
"Tags": {
"host": "server02"
},
"Time": "2024-09-01T13:41:27.3142051+08:00"
}
]
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Time
: Must be in RFC3339 format, for example:2024-09-01T13:41:27.3142051+08:00
. If not filled, the default is the current timestamp.
# Line Protocol Format
Line Protocol format reference documentation Line Protocol (opens new window)
The message payload format must be TEXT: msg.DataType = types.TEXT
The writing format supports multiple or single entries, multiple entries use \n
, for example:
cpu_load,host=server01 value=98.6 1693821027000000000
cpu_load,host=server02 value=91.6 1693821027000000000
2
The timestamp must be in nanoseconds, for example:
1693821027000000000
, if not filled, the default is the current timestamp.
# Relation Type
- Success: Execution successful, send the message to the
Success
chain - Failure: Execution failed, send the message to the
Failure
chain
# Execution Result
None