community / community.general / 6.6.8 / module / influxdb_write Write data points into InfluxDB Authors: René Moser (@resmo)community.general.influxdb_write (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
Write data points into InfluxDB.
- name: Write points into database community.general.influxdb_write: hostname: "{{influxdb_ip_address}}" database_name: "{{influxdb_database_name}}" data_points: - measurement: connections tags: host: server01 region: us-west time: "{{ ansible_date_time.iso8601 }}" fields: value: 2000 - measurement: connections tags: host: server02 region: us-east time: "{{ ansible_date_time.iso8601 }}" fields: value: 3000
ssl: default: false description: - Use https instead of http to connect to InfluxDB server. type: bool path: default: '' description: - The path on which InfluxDB server is accessible - Only available when using python-influxdb >= 5.1.0 type: str version_added: 0.2.0 version_added_collection: community.general port: default: 8086 description: - The port on which InfluxDB server is listening type: int proxies: default: {} description: - HTTP(S) proxy to use for Requests to connect to InfluxDB server. type: dict retries: default: 3 description: - Number of retries client will try before aborting. - C(0) indicates try until success. - Only available when using python-influxdb >= 4.1.0 type: int timeout: description: - Number of seconds Requests will wait for client to establish a connection. type: int use_udp: default: false description: - Use UDP to connect to InfluxDB server. type: bool hostname: default: localhost description: - The hostname or IP address on which InfluxDB server is listening. - Since Ansible 2.5, defaulted to localhost. type: str password: aliases: - login_password default: root description: - Password that will be used to authenticate against InfluxDB server. - Alias C(login_password) added in Ansible 2.5. type: str udp_port: default: 4444 description: - UDP port to connect to InfluxDB server. type: int username: aliases: - login_username default: root description: - Username that will be used to authenticate against InfluxDB server. - Alias C(login_username) added in Ansible 2.5. type: str data_points: description: - Data points as dict to write into the database. elements: dict required: true type: list database_name: description: - Name of the database. required: true type: str validate_certs: default: true description: - If set to C(false), the SSL certificates will not be validated. - This should only set to C(false) used on personally controlled sites using self-signed certificates. type: bool