PostGRESQL

The PostGRES output module allows you to write data to a PostGRESQL database server.

If your output parameters include a time parameter, these are recorded with a matching timestamp, creating a historical record of your data.

If you omit the time parameter, it will act like a simple key-value store, with the values being overwritten.

ParameterDefaultMeaning
hostlocalhostThe host name or IP address of the server
userThe name of the database user
passwordThe database password
databaseThe name of the database
tableThe name of the table to connect to
nameThe name of the field to write the point name to
valueThe name of the field to write the value to
timeThe name of the field to write the time to (if any)

Example

[
   {
       "method": "postgresql",
       "host": "myserver",
       "user": "myuser",   
       "password": "mypass",
       "database": "alertdb",
       "table": "alerts",
       "name": "code",
       "value": "status",
       "time": "stamp"
   }
]

The above example would connect to a PostGRESQL server called 'myserver' and write to the alertdb database. When new values appear, they'd be written to the alerts table, with the point name in the code column and the value in the status column.

Other Modules

Return to the list of output modules.