![]() ![]() The name of the metric will be hello_http_total. If you want to use a different Prometheus metric type, check the official documentation of grok_exporter. grok_exporter supports other Prometheus metric types as well. To extract data from the log file /tmp/hello-http.log, modify the metrics section of the config.yml file as follows: Readall should be false if you want to monitor only the newly added lines from the log file. Readall should be true if you want to monitor the entire log file and newly added lines from the log file. In this case, I want to monitor the log file /tmp/hello-http.log. In the input section, you specify the path of the log file that you want to monitor. The default configuration file should look as follows. $ sudo nano /opt /grok-exporter /config.yml #MONITOR DIRECTORY FOR NEW FILES LINUX HOW TO#In this section, I will show you how to download and install grok_exporter on your computer.įirst, navigate to the ~/Downloads directory as follows: Downloading and Installing grok_exporter: If you need any assistance on installing Prometheus on your computer, read the article How to Install Prometheus on Ubuntu 20.04 LTS. You must have Prometheus installed on your computer to be able to monitor log files with Prometheus.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |