line / promgen

Promgen is a configuration file generator for Prometheus
https://line.github.io/promgen/
MIT License
1.04k stars 150 forks source link

Change field type of url field #400

Open tester22 opened 2 years ago

tester22 commented 2 years ago

The field for the url (blackbox exporter probe) is of type URLField. This prevents the blackboxexporter to be used for tcp, ssh and smtp probes.

https://github.com/line/promgen/blob/209180f3b934f916e7b9a480dc4ab7fbc110cc33/promgen/models.py#L381

Changing it to CharField would introduce less validations but the fuctionality would be more flexible.

kfdm commented 1 year ago

I think internally we're only using blackbox exporter as an http check, hence using URLField, but you're correct that blackbox_exporter supports other kinds of checks as well. It's something that might be worth fixing, but we would also probably want to clean up the labels suggesting that it's an http only check.