This is basically going to be set up as 

file_sd_configs:
- files: [ '/path/to/file.json' ]

And I will comment out the static config.  But I'm having some issues with 
the json file.

On Monday, April 11, 2022 at 5:02:16 PM UTC-5 Andrew Meyer wrote:

> So this pure storage.  Here is more details:
>
> [
>   {
>     "targets": [ "1.2.3.4", "2.3.4.5" ],
>     "labels": {
>       "env": "prod",
>       "__pure_apitoken: API KEY,
>       "job": "pure_flashblade"
>     }
>   }
> ]
>
> On Monday, April 11, 2022 at 3:55:02 PM UTC-5 Brian Candler wrote:
>
>> 1. How do you need to provide the API token - as a HTTP header (if so 
>> what)? As a URL query parameter? Something else?
>>
>> 2. What do you mean by "set up dynamic targets"?  What service discovery 
>> mechanism are you using?
>>
>> static_configs and file_sd_configs are the same, when it comes to setting 
>> labels and targets.
>>
>> 3. What relabelling configs do you have?   That "__storage_apitoken" 
>> label must be rewritten to have some effect.  Otherwise, labels which begin 
>> with double underscore are thrown away 
>> <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config>
>> .
>>
>> 4. Aside: you shouldn't set "job" as a target label.  This is added 
>> automatically by the scrape job itself.
>>
>> On Monday, 11 April 2022 at 21:34:00 UTC+1 [email protected] wrote:
>>
>>> I am trying to set up dynamic targets for our storage environment.  I am 
>>> able to access it using the static_configs but it requires an API token.
>>>
>>> This is what I have currently configured but had to revert back to 
>>> static_configs.  It wouldn't read the API token at all.
>>>
>>> [
>>>   {
>>>     "targets": [ "1.2.3.4", "2.3.45" ],
>>>     "labels": {
>>>       "env": "prod",
>>>       "__storage_apitoken": "something-something-something-something",
>>>       "job": "storage_exporter"
>>>     }
>>>   }
>>> ]
>>>
>>

-- 
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/dd0acd17-ea6f-44f6-971f-6dac8ad0b4c3n%40googlegroups.com.

Reply via email to