if possible can you provide me with an example for the files_sd?
I am trying the below steps
in Blackbox, I configured the below JSON
[{
"labels": {
"job": "blackbox"
},
"targets": [
"http://prometheus.io",
"https://prometheus.io"
]
}]
and I tried to run ./ black_exporter --config.file=websites.json but it's
not working and I am getting the below error
ts=2022-06-23T20:12:52.331Z caller=main.go:255 level=info msg="Starting
blackbox_exporter" version="(version=0.21.0, branch=HEAD,
revision=148a9de0681062f9680bd
239d16d4a92678b4bc8)"ts=2022-06-23T20:12:52.332Z caller=main.go:256
level=info build_context="(go=go1.18.2, user=root@340341332f2f,
date=20220530-12:48:35)"ts=2022-06-23T20:12:52.332Z caller=main.go:259
level=error msg="Error loading config" err="error parsing config file:
yaml: unmarshal errors:\n line 1: cannotunmarshal !!seq into config.plain"
I guess I am doing terribly wrong but and my apologies for that because i
am entirely new to this, could you please correct me where I am doing in
Blackbox Exporter
Currently, I am running the below YAML and it's working fine
modules:
http_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
valid_status_codes: [] # Defaults to 2xx
method: GET
On Thursday, June 23, 2022 at 11:49:45 AM UTC-4 [email protected] wrote:
> Prometheus has a "file discovery" that can accept a list of targets as
> JSON or YAML.
>
> https://prometheus.io/docs/guides/file-sd/
>
> On Thu, Jun 23, 2022 at 5:47 PM surendra matta <[email protected]>
> wrote:
>
>> Hi Everyone,
>>
>> I am new to Prometheus and we doing POC in our organization using
>> Prometheus + Blackbox + AlertManager.
>>
>> Our scenarios :
>>
>> We need to monitor more than a 50 websites 24/7 in Prod and QA, sometime
>> w will add the new websites too.
>>
>> As of now , i have all my website names in a text file and my question is
>> how define this text file in Prometheus targets , please let us me whether
>> it is possible or not ? or if we have any other alternative method to test
>> the bulk URL's using black box .
>>
>> Thanks in advance.
>>
>> Regards,
>> Venkat
>>
>>
>>
>>
>>
>> --
>> 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/e5237457-86ff-46c5-94a5-9f1b3d302ce4n%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/prometheus-users/e5237457-86ff-46c5-94a5-9f1b3d302ce4n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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/654e5aaa-b61f-4e4e-a57a-b2cd29555a36n%40googlegroups.com.