Package: prometheus
Version: 1.5.2+ds-2
Severity: normal

When I call the Prometheus HTTP API using a localized date string, the API
cannot parse it to a valid timestamp. Changing the string to UTC / Zulu
makes the API work.

Examples:

Invalid URL:

http://localhost:9090/api/v1/query_range?query=node_load1{instance=
"localhost:9100",job="node"}&start=2017-02-27T21:19:19+08:00&end=2017-02-28T00:19:19+08:00&step=60m

Response:

{"status":"error","errorType":"bad_data","error":"cannot parse
\"2017-02-27T21:19:19 08:00\" to a valid timestamp"}

Valid URL:

http://localhost:9090/api/v1/query_range?query=node_load1{instance=
"localhost:9100",job="node"}&start=2017-02-27T13:20:02Z&end=2017-02-27T16:20:02Z&step=60m

Valid response:

{"status":"success","data":{"resultType":"matrix","result":[{"metric":{"__name__":"node_load1","instance":"localhost:9100","job":"node"},"values":[[1488205202,"0.1"],[1488208802,"0"],[1488212402,"0"]]}]}}

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages prometheus depends on:
ii  daemon                                   0.6.4-1
ii  libc6                                    2.24-9
ii  libjs-bootstrap                          3.3.7+dfsg-2
ii  libjs-eonasdan-bootstrap-datetimepicker  4.17.43-1
ii  libjs-jquery                             3.1.1-2
ii  libjs-jquery-hotkeys                     0~20130707+git2d51e3a9+dfsg-2
ii  libjs-moment                             2.17.1+ds-1
ii  libjs-mustache                           2.3.0-2
ii  libjs-rickshaw                           1.5.1.dfsg-1

Versions of packages prometheus recommends:
ii  prometheus-node-exporter  0.13.0+ds-1

prometheus suggests no packages.

-- no debconf information


-- 
Edward C. Lang

http://edlang.org/
_______________________________________________
Pkg-go-maintainers mailing list
Pkg-go-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers

Reply via email to