nats-io / prometheus-nats-exporter

A Prometheus exporter for NATS metrics
Apache License 2.0
381 stars 139 forks source link

ignoring server http://localhost:8222: invalid character 'p' after top-level value #88

Open wallyqs opened 5 years ago

wallyqs commented 5 years ago

Getting this error when starting prometheus exporter image as follows:

      - name: metrics
        image: synadia/prometheus-nats-exporter:0.4.0
        args:
        - -connz
        - -routez
        - -subz
        - -varz
        - -prefix=nats
        - -DV
        - http://localhost:8222
wallyqs commented 5 years ago

Seems this goes away if including an extra slash to the route:

      - name: metrics
        image: synadia/prometheus-nats-exporter:0.4.0
        args:
        - -connz
        - -routez
        - -subz
        - -varz
        - -prefix=nats
        - -DV
        - http://localhost:8222/
wallyqs commented 5 years ago

Also invalid character 'p' after top-level value probably means page not found

manuel-koch commented 2 weeks ago

I'm using it in my docker-compose setup like

  nats-metrics:
    image: natsio/prometheus-nats-exporter:0.15.0
    command: [ "-D", "-channelz", "http://nats-server:8222" ]

and regardless of a trailing / for the URL, I always get ignoring server http://nats-server:8222: invalid character 'p' after top-level value. It only vanishes when I don't use that -channelz switch. Using other switches like -varz, -connz, -jsz=all, -serverz or -subz don't seem to trigger this debug message.

Jarema commented 2 weeks ago

@manuel-koch channelz relates to nats-streaming which reached its End of Life and was replaced by JetStream. Probably should be removed entirely from the exporter code.