Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync upstream prometheus to latest HEAD #819

Merged
merged 19 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
afde470
Update mixin dashboard
janhorstmann Nov 4, 2024
8067f27
`RuleConcurrencyController`: Add `SplitGroupIntoBatches` method (#15681)
julienduchesne Jan 6, 2025
1a27ab2
Rules: Store dependencies instead of boolean (#15689)
julienduchesne Jan 6, 2025
73a3438
api: Add two new fields Node and ServerTime.
sujalshah-bit Jan 5, 2025
18bb8bf
Merge pull request #15784 from sujalshah-bit/15394_server_name_and_time
juliusv Jan 7, 2025
df55e53
docs: fix spelling
beorn7 Jan 7, 2025
919a5b6
Expose ListPostings Length via Len() method (#15678)
yeya24 Jan 7, 2025
02501e0
Merge pull request #15789 from prometheus/beorn7/doc2
juliusv Jan 7, 2025
7687661
promqltest: make eval_ordered ignore annotations
beorn7 Jan 8, 2025
d9a80a9
docs: Document eval_warn and eval_info
beorn7 Jan 8, 2025
1ea9b72
Merge pull request #15795 from prometheus/beorn7/promql
beorn7 Jan 8, 2025
a768a3b
Rule Concurrency: Test safe abort of rule evaluations (#15797)
julienduchesne Jan 8, 2025
9d6f88c
Add additional tests for operators over incompatible nhcb (#15787)
fionaliao Jan 9, 2025
d173c0b
Merge pull request #15334 from janhorstmann/feature/update-monitoring…
metalmatze Jan 9, 2025
b3e30d5
[BUGFIX] PromQL: Fix `<aggr_over_time>` functions with histograms (#1…
NeerajGartia21 Jan 9, 2025
6339989
web/api: Add a limit parameter to /query and /query_range (#15552)
Vandit1604 Jan 9, 2025
f030894
Fix issues raised by staticcheck (#15722)
aknuds1 Jan 9, 2025
0a19f12
Rule Concurrency: Simpler loop for sequential (default) executions (#…
julienduchesne Jan 9, 2025
c7f1945
Merge commit '0a19f1268e2dbb9bae9568f007a9809e8fba0402' into juliendu…
julienduchesne Jan 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/prometheus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ func main() {

_, err := a.Parse(os.Args[1:])
if err != nil {
fmt.Fprintln(os.Stderr, fmt.Errorf("Error parsing command line arguments: %w", err))
fmt.Fprintf(os.Stderr, "Error parsing command line arguments: %s\n", err)
a.Usage(os.Args[1:])
os.Exit(2)
}
Expand All @@ -548,7 +548,7 @@ func main() {
notifs.AddNotification(notifications.StartingUp)

if err := cfg.setFeatureListOptions(logger); err != nil {
fmt.Fprintln(os.Stderr, fmt.Errorf("Error parsing feature list: %w", err))
fmt.Fprintf(os.Stderr, "Error parsing feature list: %s\n", err)
os.Exit(1)
}

Expand Down Expand Up @@ -1742,7 +1742,7 @@ func (s *readyStorage) WALReplayStatus() (tsdb.WALReplayStatus, error) {
}

// ErrNotReady is returned if the underlying scrape manager is not ready yet.
var ErrNotReady = errors.New("Scrape manager not ready")
var ErrNotReady = errors.New("scrape manager not ready")

// ReadyScrapeManager allows a scrape manager to be retrieved. Even if it's set at a later point in time.
type readyScrapeManager struct {
Expand Down
9 changes: 4 additions & 5 deletions cmd/promtool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"github.com/prometheus/client_golang/api"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/testutil/promlint"
config_util "github.com/prometheus/common/config"
"github.com/prometheus/common/expfmt"
"github.com/prometheus/common/model"
"github.com/prometheus/common/promslog"
"github.com/prometheus/common/version"
Expand All @@ -45,7 +45,6 @@ import (

dto "github.com/prometheus/client_model/go"
promconfig "github.com/prometheus/common/config"
"github.com/prometheus/common/expfmt"

"github.com/prometheus/prometheus/config"
"github.com/prometheus/prometheus/discovery"
Expand Down Expand Up @@ -312,12 +311,12 @@ func main() {
kingpin.Fatalf("Cannot set base auth in the server URL and use a http.config.file at the same time")
}
var err error
httpConfig, _, err := config_util.LoadHTTPConfigFile(httpConfigFilePath)
httpConfig, _, err := promconfig.LoadHTTPConfigFile(httpConfigFilePath)
if err != nil {
kingpin.Fatalf("Failed to load HTTP config file: %v", err)
}

httpRoundTripper, err = promconfig.NewRoundTripperFromConfig(*httpConfig, "promtool", config_util.WithUserAgent("promtool/"+version.Version))
httpRoundTripper, err = promconfig.NewRoundTripperFromConfig(*httpConfig, "promtool", promconfig.WithUserAgent("promtool/"+version.Version))
if err != nil {
kingpin.Fatalf("Failed to create a new HTTP round tripper: %v", err)
}
Expand Down Expand Up @@ -702,7 +701,7 @@ func checkConfig(agentMode bool, filename string, checkSyntaxOnly bool) ([]strin
return ruleFiles, nil
}

func checkTLSConfig(tlsConfig config_util.TLSConfig, checkSyntaxOnly bool) error {
func checkTLSConfig(tlsConfig promconfig.TLSConfig, checkSyntaxOnly bool) error {
if len(tlsConfig.CertFile) > 0 && len(tlsConfig.KeyFile) == 0 {
return fmt.Errorf("client cert file %q specified without client key file", tlsConfig.CertFile)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/http_sd.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sort_rank: 7
Prometheus provides a generic [HTTP Service Discovery](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config),
that enables it to discover targets over an HTTP endpoint.

The HTTP Service Discovery is complimentary to the supported service
The HTTP Service Discovery is complementary to the supported service
discovery mechanisms, and is an alternative to [File-based Service Discovery](https://prometheus.io/docs/guides/file-sd/#use-file-based-service-discovery-to-discover-scrape-targets).

## Comparison between File-Based SD and HTTP SD
Expand Down
4 changes: 4 additions & 0 deletions docs/querying/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ URL query parameters:
- `time=<rfc3339 | unix_timestamp>`: Evaluation timestamp. Optional.
- `timeout=<duration>`: Evaluation timeout. Optional. Defaults to and
is capped by the value of the `-query.timeout` flag.
- `limit=<number>`: Maximum number of returned series. Doesn’t affect scalars or strings but truncates the number of series for matrices and vectors. Optional. 0 means disabled.

The current server time is used if the `time` parameter is omitted.

Expand Down Expand Up @@ -154,6 +155,7 @@ URL query parameters:
- `step=<duration | float>`: Query resolution step width in `duration` format or float number of seconds.
- `timeout=<duration>`: Evaluation timeout. Optional. Defaults to and
is capped by the value of the `-query.timeout` flag.
- `limit=<number>`: Maximum number of returned series. Optional. 0 means disabled.

You can URL-encode these parameters directly in the request body by using the `POST` method and
`Content-Type: application/x-www-form-urlencoded` header. This is useful when specifying a large
Expand Down Expand Up @@ -1158,6 +1160,8 @@ $ curl http://localhost:9090/api/v1/status/runtimeinfo
"data": {
"startTime": "2019-11-02T17:23:59.301361365+01:00",
"CWD": "/",
"hostname" : "DESKTOP-717H17Q",
"serverTime": "2025-01-05T18:27:33Z",
"reloadConfigSuccess": true,
"lastConfigTime": "2019-11-02T17:23:59+01:00",
"timeSeriesCount": 873,
Expand Down
Loading
Loading