Hello everybody, i’m a beginner on grafana and more especially with Loki, my question may be ridiculous and Counter-current to logs phylosophy.
I have to do a proof-of-concept with 2 servers: 1 with grafana-agent flow which send logs to an another (loki/grafana embedded).
Apache logs are received to grafana like this:
209.145.30.102 - williamson5760 [19/Feb/2024:13:33:13 +0000] “PUT /deliverables/target HTTP/1.0” 302 37797 “https://www.leadbricks-and-clicks.net/disintermediate/target/functionalities” “Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_9_2 rv:3.0) Gecko/2021-30-01 Firefox/35.0”
I had a pattern query:
{job=“genlogs01-apache”} | pattern <ip> - <username> [<timestamp>] "<method> <url> HTTP/<http_version>" <status> <size> "<referrer>" "<user_agent>"
And finally my question How can I extract fields like “method” or “status” to make pie chart for example? It is actually in “Line” Field
Thank you for your help and have a good day