lukasmalkmus / tankerkoenig_exporter

A prometheus exporter for the Tankerkoenig API (gas prices).
Apache License 2.0
19 stars 3 forks source link

Option to exclude stations #24

Open bergnerj opened 7 months ago

bergnerj commented 7 months ago

Hello,

I use the exporter to monitor the gas prices in an area of 10 km around where I live. This is very nice and very convenient to decide when to go for new gas.

However, within this radius, there are two stations on a rest areaalong the motorway. Naturally, they are way more expensive than all the other stations in the area and I would like to exclude them from the list of stations I monitor. Of course, I could just provide a quite extensive list of all the stations I actually want to include, which I actually tried:

tankerkoenig_exporter --tankerkoenig.api-key $api_key --tankerkoenig.stations="$id1" --tankerkoenig.stations="$id2" ...

However, that approach results in the following error for me:

retentioner: error: create exporter: could not retrieve station details for station xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx: invalid character '<' looking for beginning of value Ultimately, I don't think that creating such a list is the way to go, anyway.

Would it be possible to include a "--tankerkoenig.exclude"-flag that could be used to omit particular gas stations?