Luzilla / dnsbl_exporter

Prometheus compatible exporter to query DNSBLs/RBLs.
https://www.luzilla-capital.com/
Other
30 stars 8 forks source link

Is there any chance that we could get more information about the block reason? #166

Closed zentavr closed 3 months ago

zentavr commented 11 months ago

Hello @till!

Thank you for the nice tool! Very oftenly DNSBL providers provide the description of the block, when you query TXT record. For example:

$ dig -t TXT 212.40.245.168.dnsbl-3.uceprotect.net

;; ANSWER SECTION:
212.40.245.168.dnsbl-3.uceprotect.net. 1973 IN TXT "Your ISP SENDGRID, US/AS11377 is UCEPROTECT-Level3 listed because of a spamscore of 55.7. See: http://www.uceprotect.net/rblcheck.php?ipr=168.245.40.212"

I wonder if it is possible to put this, saying, into the label?

till commented 10 months ago

Label is hard as each label blows up the storage requirements in prometheus. I am not sure if I am logging it though. Have you checked there?

zentavr commented 10 months ago

@till we just have an information about if the resource blacklisted or not. That’s it.

till commented 10 months ago

@zentavr maybe logging the response? Would you be able to help with a PR?

zentavr commented 10 months ago

@till I’m not so good with the Golang, but I can try that.

till commented 10 months ago

@zentavr I have to rebase my PR, but potentially it is already fixed (or at least I tried to): https://github.com/Luzilla/dnsbl_exporter/blob/6ba677d467c26e31b87e1a794220975d780ecc1d/pkg/rbl/rbl.go#L82-L104

Do you have an example of a listed host that I can use?

zentavr commented 10 months ago

So, do you want to produce an error string and fetch it with the tool like promtail (then Loki -> Grafana), correct?--Thanks, Andrii   Miroshnychenko                       @. серп. 2023 р. о 14:54 Till! @.> пише: @zentavr I have to rebase my PR, but potentially it is already fixed (or at least I tried to): https://github.com/Luzilla/dnsbl_exporter/blob/6ba677d467c26e31b87e1a794220975d780ecc1d/pkg/rbl/rbl.go#L82-L104 Do you have an example of a listed host that I can use?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

till commented 10 months ago

@zentavr yeah, I guess. A logline, because the /metrics endpoint doesn't really suite itself to show errors.

till commented 3 months ago

Log line should be there now: https://github.com/Luzilla/dnsbl_exporter/blob/8e2cb6ccc781609a07397fd151d2a72ac389c2b2/collector/collector.go#L159