Showmax / prometheus-pusher

Scrapes local metric from local exporters and pushes them towards Prometheus pushgateway
http://tech.showmax.com
Other
36 stars 16 forks source link

Failure starting when route map is not configured #13

Closed viralkamdar closed 5 years ago

viralkamdar commented 6 years ago

Though the route_map and default_route parameters are optional, prometheus-pusher fails to start if they are not set

time="2017-11-21T11:47:55Z" level=fatal msg="Failed to parse route map - open : no such file or directory" hostname=0f111aa9a003 msg_type=log service=prometheus-pusher

zstyblik commented 6 years ago

@viralkamdar, please, can you post your config? I see no such error here.

viralkamdar commented 6 years ago

[config] pushgateway_url = "http://myhost:9091" push_interval = 10 pushgateway_user = "" pushgateway_password = ""

[target_9102] host = "localhost" port = 9102 path = "/metrics"

zstyblik commented 6 years ago

Sorry @viralkamdar, but I'm not seeing the same error as you do. I've used the config you've pasted and changed ports, though my Prometheus endpoint returns 500, because it's not a Prometheus instance.

INFO[0000] Starting prometheus-pusher                    hostname=test msg_type=log service=prometheus-pusher
DEBU[0000] Getting metrics                               hostname=test metric_name="target_9100" metric_url="http://localhost:32768/metrics" msg_type=log service=prometheus-pusher
DEBU[0000] Pushing metrics.                              endpoint_url="http://localhost:8000/metrics/job/target_9100/instance/test" hostname=test metric_name="target_9100" msg_type=log service=prometheus-pusher
DEBU[0010] Getting metrics                               hostname=test metric_name="target_9100" metric_url="http://localhost:32768/metrics" msg_type=log service=prometheus-pusher
DEBU[0010] Pushing metrics.                              endpoint_url="http://localhost:8000/metrics/job/target_9100/instance/test" hostname=test metric_name="target_9100" msg_type=log service=prometheus-pusher

Are you really sure you're running prometheus-pusher compiled from the top of the master branch?

bobek commented 5 years ago

Closing for inactivity.