mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
When reducing the collection interval in Prometheus it may be necessary to to reduce the metrics gathering timeout to ensure it's less than the interval. Add config options to adjust the timeouts used for metrics gathering so that these can be set accordingly.
22 lines
653 B
JavaScript
22 lines
653 B
JavaScript
"use strict";
|
|
const libConfig = require("@clusterio/lib/config");
|
|
|
|
class InstanceConfigGroup extends libConfig.PluginConfigGroup {}
|
|
InstanceConfigGroup.groupName = "statistics_exporter";
|
|
InstanceConfigGroup.define({
|
|
name: "command_timeout",
|
|
title: "Command Timeout",
|
|
description: "Timeout in seconds of the metrics command before returning results from the previous invocation.",
|
|
type: "number",
|
|
initial_value: 1,
|
|
});
|
|
InstanceConfigGroup.finalize();
|
|
|
|
module.exports = {
|
|
name: "statistics_exporter",
|
|
title: "Prometheus Statistics Export",
|
|
description: "Exports statistics to Prometheus",
|
|
instanceEntrypoint: "instance",
|
|
InstanceConfigGroup,
|
|
};
|