i am able to start server only when i made config like this:
static_configs:
- targets: [ ' localhost:9090 ' , ' localhost:4437 ' ] then exceed
error comes in target
but when i do like in below its shuts down i mentioned
I made the following changes as you said
here is config:
# my global config
global:
scrape_interval: 50s # Set the scrape interval to every 15 seconds.
Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default
is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global
'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries
scraped from this config.
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
- job_name: 'Product'
static_configs:
- targets: ['localhost:'xxxx']
metrics_path: '/metrics-text'
# i am adding reqired space which is valid for yml files
# not able to sort server shutdown error
On Sunday, October 4, 2020 at 9:57:20 PM UTC+5:30 [email protected] wrote:
> "Context deadline exceeded" would not stop prometheus from starting. If
> the problem really is that the prometheus server is shutting down, then
> there will be some other error message logged.
>
> The formatting of the config file you posted was lost, and in particular,
> the metrics_path is placed wrongly (it should align with job_name and
> static_configs). Hence the "scrape_configs" section should look something
> like this:
>
> - job_name: 'prometheus'
> static_configs:
> - targets: ['localhost:9090']
>
> - job_name:'product'
> static_configs:
> - targets: ['localhost:4437']
> metrics_path: '/metrics-text'
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/2bc7d0d8-fb91-4f89-b7bd-ef54dab96ec7n%40googlegroups.com.