The YAML formatting is still wrong.  If you can't paste it accurately into 
Google Groups, try using a service like pastebin to give an accurate copy 
of your YAML file.

On Monday, 30 November 2020 at 03:43:43 UTC shrivasta...@gmail.com wrote:

>
> CONFIG FILE:
>
>     ---
> # my global config
> global:
> scrape_interval: 15s # By default, scrape targets every 15 seconds.
> evaluation_interval: 15s # By default, scrape targets every 15 seconds.
> # scrape_timeout is set to the global default (10s).
> # Attach these labels to any time series or alerts when communicating with
> # external systems (federation, remote storage, Alertmanager).
> external_labels:
> monitor: 'Vocera'
>
> # Load and evaluate rules in this file every 'evaluation_interval' seconds.
> rule_files:
> - /etc/prometheus/alertmanagerconf.yml
> # - "first.rules"
> # - "second.rules"
>
> # A scrape configuration containing exactly one endpoint to scrape:
> # Here it's Prometheus itself.
> scrape_configs:
> - job_name: 'Node-FileDiscovery'
> file_sd_configs:
> - files:
> - 'target/target.json'
> - job_name: 'xxxxxxx-xxxxxx-poc-jmx'
> static_configs:
> - targets: 
> - '192.168.43.3:9876'
> labels:
> tag_product: xxxxxx-tooling
> tag_environment: dev
> tag_role: xxxx
> tag_platform: linux
> instance: xxxxxxxxxx
> - targets :
> - '192.168.43.5:9876'
> labels:
> tag_product: xxxxxx-tooling
> tag_environment: dev
> tag_role: xxxxx
> tag_platform: linux
> instance: xxxxx
> - job_name: 'xxxxx-Microservices'
> scrape_interval: 5s
> metrics_path: /api/prometheus
> scheme: https
> tls_config:
> insecure_skip_verify: true
> kubernetes_sd_configs:
> - role: service
> namespaces:
> names:
> - xxxxx-xxxxx-dev
> selectors:
> - role: service
> label: "app=core" 
> relabel_configs:
> - source_labels: [__address__]
> target_label: __param_target
> replacement: $1
> action: replace
> - source_labels: [__param_target]
> target_label: instance
> replacement: $1
> action: replace
> - source_labels: [__meta_kubernetes_namespace]
> target_label: kubernetes_namespace
> replacement: $1
> action: replace
> - source_labels: [__meta_kubernetes_service_name]
> target_label: kubernetes_name
> replacement: $1
> action: replace
> - source_labels: [__meta_kubernetes_service_label_app]
> target_label: app
> replacement: $1
> action: replace
> alerting:
> alertmanagers:
> - static_configs:
> - targets:
> - alertmanager:9093
>
>
> ERROR:
>
> level=error ts=2020-11-30T03:40:47.020Z caller=main.go:723 err="error 
> loading config from \"/etc/prometheus/prometheus.yml\": couldn't load 
> configuration (--config.file=\"/etc/prometheus/prometheus.yml\"): parsing 
> YAML file /etc/prometheus/prometheus.yml: yaml: unmarshal errors:\n  line 
> 54: field selectors not found in type kubernetes.plain"
> On Sunday, 29 November 2020 at 01:31:50 UTC-8 b.ca...@pobox.com wrote:
>
>> > In fact, the configuration file does not save saying not able to parse 
>> the YAML config file.
>>
>> 1. Can you show the actual YAML you are using, with correct formatting?  
>> The example you posted is invalid because it doesn't have the spaces to 
>> perform YAML alignment.
>> 2. Can you show the actual error message?
>>
>> On Saturday, 28 November 2020 at 19:15:10 UTC shrivasta...@gmail.com 
>> wrote:
>>
>>> Guyys?
>>>
>>> On Tuesday, 24 November 2020 at 23:10:22 UTC-8 Shubham Shrivastav wrote:
>>>
>>>> Hello,
>>>> I'm trying to scrape all services that have labels *app: core. *However, 
>>>> after adding the below section to kubernetes_sd_configs, I'm not getting 
>>>> limited services in the Prometheus targets list. In fact, the 
>>>> configuration 
>>>> file does not save saying not able to parse the YAML config file.
>>>>
>>>> After I remove the below section it works fine. I'm placing it in the 
>>>> config file as mentioned below:
>>>>
>>>> *kubernetes_sd_configs:*
>>>> * - role: service*
>>>> * namespaces:*
>>>> * names:*
>>>> * - ns-1*
>>>> *selectors:*
>>>> * - role: service*
>>>> * label: "app=core"*
>>>>
>>>> Can anyone help me out with this?
>>>>
>>>

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/b2de7731-9ea7-4283-a604-1376290b0768n%40googlegroups.com.

Reply via email to