Commit graph

3947 commits

Author SHA1 Message Date
Pablo Andres Fuente c79a4db812 Adding tests for util/httputil/client (#3002)
Adding tests for util/httputil/client with a 100% coverage.
Removing the NewDeadlineRoundTripper from util/httputil/client because
is not used.
Adding a new test util to check http.Request in http.RoundTrip interface
implementors.
2017-08-09 13:23:57 +01:00
Tobias Schmidt 1ea9ab601e Merge pull request #2997 from emluque/2831-Healthy_Ready_Endpoints
Add `/-/healthy` and `/-/ready` endpoints #2831
2017-08-07 23:35:07 +02:00
emluque ff54c5c11a 2831 Add Healthy and Ready endpoints 2017-08-07 17:34:04 -03:00
Brian Brazil 4c8173acac Use timestamp of a sample in deriv() to avoid FP issues (#2958)
With the squaring of the timestamp, we run into the
limitations of the 53bit mantissa for a 64bit float.

By subtracting away a timestamp of one of the samples (which is how the
intercept is used) we avoid this issue in practice as it's unlikely
that it is used over a very long time range.

Fixes #2674
2017-08-07 17:15:38 +01:00
Yuki Ito 1bf3b91ae0 Make sure that url for remote_read/write is not nil (#3024) 2017-08-07 08:49:45 +01:00
Fabian Reinartz 62047e5c97 Merge pull request #2980 from Gouthamve/contrib.md
Add section for new contributors
2017-08-03 15:45:14 +02:00
Tom Wilkie e1c77cdfd4 Merge pull request #2991 from tomwilkie/2990-remote-config
Make queue manager configurable.
2017-08-03 10:26:29 +01:00
Fabian Reinartz ac511ecf30 Merge pull request #2970 from Gouthamve/docs/sd-interface
Add docs about SD interface
2017-08-01 22:44:28 +02:00
Tom Wilkie 5169f990f9 Review feedback: add yaml struct tags, don't embed queue config.
Also, rename QueueManageConfig to QueueConfig, for consistency with tags.
2017-08-01 14:43:56 +01:00
Goutham Veeramachaneni ab96e79bc8 Add docs about SD interface
Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-08-01 13:53:50 +05:30
Fabian Reinartz bc2e9459d8 Merge pull request #2973 from tomwilkie/2969-negative-shards
Prevent number of remote write shards from going negative.
2017-07-28 13:02:33 +02:00
Fabian Reinartz 40db026381 Merge pull request #2957 from prometheus/sd-doc
Tweaks to SD README from review
2017-07-28 08:51:50 +02:00
Goutham Veeramachaneni d733769722 Add section for new contributors
Inspiration from this blog post: https://manishearth.github.io/blog/2016/01/03/making-your-open-source-project-newcomer-friendly/

Some parts are lifted from: https://github.com/servo/servo/blob/master/CONTRIBUTING.md

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-07-27 16:53:34 +05:30
Tom Wilkie 454b661145 Make queue manager configurable. 2017-07-25 13:47:34 +01:00
Conor Broderick 4b868113bb Metric name validation (#2975) 2017-07-24 13:49:20 +01:00
beorn7 3bb0667607 Merge branch 'release-1.7' 2017-07-21 19:40:30 +02:00
Björn Rabenstein a5ddcf5fb2 Merge pull request #2979 from prometheus/beorn7/storage2
Fix iterator issue in varbit chunk
2017-07-21 19:38:23 +02:00
beorn7 ea5e7eafde Fix #2965
We would overscan when hitting a value directly, interspersed with
samples in between timestamps. Apparently, that happens rarely enough
that it was only noticed recently.
2017-07-21 16:35:15 +02:00
beorn7 c06292af2f Add test to expose #2965 2017-07-21 16:25:24 +02:00
Felicity f30b10223a documentation: update Kubernetes example for 1.7 (#2918)
Kubernetes 1.7+ no longer exposes cAdvisor metrics on the Kubelet
metrics endpoint.  Update the example configuration to scrape cAdvisor
in addition to Kubelet.  The provided configuration works for 1.7.3+
and commented notes are given for 1.7.2 and earlier versions.

Also remove the comment about node (Kubelet) CA not matching the master
CA.  Since the example no longer connects directly to the nodes, it
doesn't matter what CA they're using.

References:

- https://github.com/kubernetes/kubernetes/issues/48483
- https://github.com/kubernetes/kubernetes/pull/49079
2017-07-21 14:10:02 +02:00
Tom Wilkie 1d94eb8d95 Prevent number of remote write shards from going negative.
This can happen in the situation where the system scales up the number of shards massively (to deal with some backlog), then scales it down again as the number of samples sent during the time period is less than the number received.
2017-07-19 16:27:19 +01:00
Alexey Palazhchenko 76c9a0d931 Fix typo (#2963) 2017-07-18 16:11:10 +01:00
Alexey Palazhchenko 695ec0b981 Fix few typos. (#2962) 2017-07-18 13:58:00 +01:00
J. Taylor O'Connor 5a19ffb315 A few spelling corrections. (#2960) 2017-07-17 22:13:50 +01:00
Brian Brazil 84be97bd98 Tweaks to SD README from review 2017-07-17 14:20:54 +01:00
Brian Brazil 2a9ca394dd Document how/when to write service discovery (#2943) 2017-07-14 15:22:09 +01:00
Martín Ferrari bb13a23d29 Merge pull request #2934 from TheTincho/fix-migrated-url-redirect
Add PATH_PREFIX to redirectToMigratedURL
2017-07-11 20:31:22 +01:00
Martín Ferrari 64cfe2e7f5 Add PATH_PREFIX to redirectToMigratedURL
Old grafana versions use this format, and it breaks with prometheus instances
not mounted in the root directory.
2017-07-11 17:36:17 +00:00
Alexey Palazhchenko b6f89a1982 Parse custom step parameter correctly. (#2928)
Backport of 6a767b736b.
Refs #2827, #2861.
2017-07-10 21:05:40 +02:00
Matthias Rampke f0f2ec7854 Merge pull request #2927 from pafuent/fix-test-short-for-windows
Fixing tests for Windows
2017-07-10 16:11:00 +00:00
Fuente, Pablo Andres 9eb8c6e1d2 Renaming the config_notwin test to config_default 2017-07-10 11:08:16 -03:00
Fabian Reinartz bff55bfa72 Merge pull request #2921 from tomwilkie/2920-test
Add _test.go suffix to promql/bench.go, split test.go in to two.
2017-07-10 12:00:58 +02:00
Fuente, Pablo Andres fe73de9452 Renaming config test file to fix build tags
Renaming the name of a file of the config tests, in order to properly
use the Go build tags feature.
2017-07-10 00:02:08 -03:00
Fuente, Pablo Andres 193dc47230 Fixing code style to adhere gofmt 2017-07-09 02:43:33 -03:00
Fuente, Pablo Andres 902fafb8e7 Fixing tests for Windows
Fixing the config/config_test, the discovery/file/file_test and the
promql/promql_test tests for Windows. For most of the tests, the fix involved
correct handling of path separators. In the case of the promql tests, the
issue was related to the removal of the temporal directories used by the
storage. The issue is that the RemoveAll() call returns an error when it
tries to remove a directory which is not empty, which seems to be true due to
some kind of process that is still running after closing the storage. To fix
it I added some retries to the remove of the temporal directories.
Adding tags file from Universal Ctags to .gitignore
2017-07-09 01:59:30 -03:00
Tom Wilkie 835eb8c653 Add _test.go suffix to promql/{bench.go, test.go} to prevent importing the testing package in a normal binary. 2017-07-07 15:52:44 +01:00
Fabian Reinartz be990c0287 Merge pull request #2907 from Gouthamve/log-tm
Log the stopping of TargetManager in Info
2017-07-06 12:00:11 +02:00
Goutham Veeramachaneni a607873ad2 Log the stopping of TargetManager in Info
Fixes #2715

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
2017-07-06 11:44:07 +02:00
Fabian Reinartz e58e7954a7 Merge pull request #2904 from Gouthamve/srclbl-omitempty
Make sure rendering config produces valid config
2017-07-05 16:24:18 +02:00
Goutham Veeramachaneni 98d20d5880 Make sure rendering config produces valid config
Fixes #2899

Signed-off-by: Goutham Veeramachaneni <goutham@boomerangcommerce.com>
2017-07-05 16:09:29 +02:00
Fabian Reinartz 3ed4fea58c Merge pull request #2902 from mattbostock/patch-2
Remote queue manager: Fix typo
2017-07-05 11:57:52 +02:00
Matt Bostock 13c6e4a4bc Remote queue manager: Fix typo
Change 'send' to 'sent'.
2017-07-04 20:48:52 +01:00
Alin Sinpalean 38de290d5f Console graph color scheme support (#2900)
Add a colorScheme parameter to PromConsole.Graph, to allow using custom colors in console graphs.
2017-07-04 15:30:12 +01:00
Tobias Schmidt 43075d0215 Merge pull request #2865 from mattbostock/add_marathon_port_ordinal_label
Marathon SD: Set port index label
2017-06-23 12:57:09 +02:00
Matt Bostock ab4d64959f Marathon SD: Set port index label
The changes [1][] to Marathon service discovery to support multiple
ports mean that Prometheus now attempts to scrape all ports belonging to
a Marathon service.

You can use port definition or port mapping labels to filter out which
ports to scrape but that requires service owners to update their
Marathon configuration.

To allow for a smoother migration path, add a
`__meta_marathon_port_index` label, whose value is set to the port's
sequential index integer. For example, PORT0 has the value `0`, PORT1
has the value `1`, and so on.

This allows you to support scraping both the first available port (the
previous behaviour) in addition to ports with a `metrics` label.

For example, here's the relabel configuration we might use with
this patch:

    - action: keep
      source_labels: ['__meta_marathon_port_definition_label_metrics', '__meta_marathon_port_mapping_label_metrics', '__meta_marathon_port_index']
      # Keep if port mapping or definition has a 'metrics' label with any
      # non-empty value, or if no 'metrics' port label exists but this is the
      # service's first available port
      regex: ([^;]+;;[^;]+|;[^;]+;[^;]+|;;0)

This assumes that the Marathon API returns the ports in sorted order
(matching PORT0, PORT1, etc), which it appears that it does.

[1]: https://github.com/prometheus/prometheus/pull/2506
2017-06-23 09:52:52 +01:00
Alexey Palazhchenko 6a767b736b Parse custom step parameter correctly. (#2861)
Fixes #2827.
2017-06-19 17:22:59 +01:00
Fabian Reinartz f46a8e9ea4 Merge pull request #2854 from prometheus/promql-rune
Check for invalid utf-8 in lexer strings.
2017-06-17 14:42:20 +02:00
Brian Brazil 6f5d952132 Check for invalid utf-8 in lexer strings.
This protects against invalid utf-8 sneaking
in via label_replace.
2017-06-16 15:19:24 +01:00
Harsh Agarwal 16867c89a7 implement label_join issue 1147 (#2806)
Replace OptionalArgs int with Variadic int.
2017-06-16 14:51:22 +01:00
Fabian Reinartz c89f8753f5 Merge pull request #2828 from prometheus/sd-label-valid
Check target labels are valid. Check for address after relabelling.
2017-06-16 10:43:45 +02:00