apache_exporter icon indicating copy to clipboard operation
apache_exporter copied to clipboard

Add support for '--web.config.file' flag and TLS authentication

Open chillriver opened this issue 2 years ago • 5 comments

Hello,

how does the topic already say. I have that error when I started the service from systemd an read in the log from journalctl:

apache_exporter: error: unknown long flag '--web.config.file', try --help

I want to add a configfile in order to use TLS and define the certspath. Here is my configfragment in the unitfile from systemd.

ExecStart=/usr/local/bin/apache_exporter
--web.config.file="/etc/apache_exporter/web.yml"
--scrape_uri="http://localhost/server-status?auto"
--telemetry.address="0.0.0.0:9117"

Version of my apache_exporter v0.11.0

chillriver avatar Mar 16 '22 15:03 chillriver

hi @chillriver, that's currently not a supported option

Feel free to submit a PR in order to add that feature

Lusitaniae avatar Mar 16 '22 15:03 Lusitaniae

hi @Lusitaniae,

thanks for your reply. I tried something to test and made lucky result. It works!!

I changed follow: --web.config.file=.....

to : --web.config=.....

The configfile is loading and now I can pull from my webbrowser with TLS. Can you confirm this setting?

chillriver avatar Mar 17 '22 16:03 chillriver

That's good to hear

Seems I rushed in my reply and give you wrong information!

Would you like to make a quick PR to update the parameter mentioned in the README at https://github.com/Lusitaniae/apache_exporter/blob/aee05657dae4661965fbd40df3fb99fc43b5c016/README.md#tls-and-basic-authentication and anything else you think relevant?

Lusitaniae avatar Mar 17 '22 19:03 Lusitaniae

Yes I can edit the README and make a PR. It should be change the TLS chapter and also the help on flags.

chillriver avatar Mar 18 '22 10:03 chillriver

Much appreciated!

Lusitaniae avatar Mar 18 '22 10:03 Lusitaniae