节点导出器文本文件舞会包含时间戳

时间:2019-11-29 06:27:07

标签: prometheus-node-exporter

我有这个舞会文件,它在dir node_textfile_dir_test内部包含以下内容:

# HELP proj_alert_email number of customer alert emails sent
# TYPE proj_alert_email gauge
inview_proj_email{ host="myhost" } 103 1575003541000
# HELP proj_alert_sms number of customer alert smses sent
# TYPE proj_alert_sms gauge
proj_alert_sms{ host="myhost" } 9 1575003541000

当我尝试运行node_exporter时:

/usr/local/bin/node_exporter --collector.textfile.directory /node_textfile_dir_test

它会产生此错误:

ERRO[0002] Textfile "/node_textfile_dir_test/customer-alerts.prom" contains unsupported client-side timestamps, skipping entire file

所以我尝试删除时间戳部分:

# HELP proj_alert_email number of customer alert emails sent
# TYPE proj_alert_email gauge
inview_proj_email{ host="myhost" } 103 
# HELP proj_alert_sms number of customer alert smses sent
# TYPE proj_alert_sms gauge
proj_alert_sms{ host="myhost" } 9 

现在再次出错:

ERRO[0002] Error parsing "/node_textfile_dir_test/customer-alerts.prom": text format parsing error in line 3: expected integer as timestamp, got ""

我从node exporter documenatation得知,不允许使用时间戳记。

0 个答案:

没有答案