GigaSpaces XAP is shipped with built-in support for InfluxDB. This page explains how to configure XAP to report metrics to InfluxDB.
Configuration takes place in
metrics.xml, which resides in
XAP_HOME/config/metrics. For more information see Configuration.
InfluxDB currently runs only on Linux. If you have a repository that runs on Windows, you can implement your own custom reporter to integrate with the repository.
InfluxDB provides an HTTP API for writing data, which is implemented by XAP. For example, if InfluxDB is installed on
myhost and you want to report metrics to the
mydb database, use the following configuration:
<metrics-configuration> <reporters> <reporter name="influxdb-http"> <property name="host" value="myhost"/> <property name="database" value="mydb"/> <property name="username" value="root"/> <property name="password" value="root"/> </reporter> </reporters> </metrics-configuration>
InfluxDB security is enabled by default, and requires a username and password to access the database. The default username and password are
root, as in the example above. If your database has different username/password, change the configuration accordingly.
The InfluxDB HTTP API is bounded to port
8086 by default. If you’ve configured your InfluxDB instance to use a different port you should modify the reporter configuration accordingly and add a
<property name="port" value="nnnn"/> with the new port.
The InfluxDB reporter batches multiple metrics within each report to maximize performance, up to a maximum value determined by the
max-report-length property. The default value is
65507 (based on UDP max length), and usually should not be changed.
InfluxDB allows you to write data through UDP, assuming you will be writing data to a single database which is configured in InfluxDB’s configuration file. The following snippet shows how to configure xap to use it:
<metrics-configuration> <reporters> <reporter name="influxdb-udp"> <property name="host" value="myhost"/> <property name="port" value="4444"/> </reporter> </reporters> </metrics-configuration>
Note we’re setting the
host to the location of the InfluxDB installation, and the database is not configured here at all. The default port is