I am trying to expose metrics from a file (using a simple http server on my dev box). I have a local instance of prometheus running, fresh without any data. When I launch it with target pointing to my http server, I get the following warning and data is not ingested.
level=warn ts=2017-11-17T01:31:04.68807107Z caller=scrape.go:908 component="target manager" scrape_pool=zodiac target=http://localhost:9999/data/metrics.txt msg="Error on ingesting samples that are too old or are too far into the future" num_dropped=1
Any idea how to get rid of this message? I tried with multiple samples, different timestamps, but data doesn't get ingested. The timestamp is GMT: Thursday, November 16, 2017 8:09:44 PM
------------------
# HELP zodiac_metric_hv_count Count of hvs.
# TYPE zodiac_metric_hv_count gauge
zodiac_metric_hv_count{dim="total",domain="xxx2",region="test",state="ok",instance="prod",job="zodiac"} 2 1510862984
Config:
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'codelab-monitor'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'zodiac'
honor_labels: true
scrape_interval: 5s
metrics_path: '/data/metrics.txt'
static_configs:
- targets:
- 'localhost:9999'
labels: