Prometheus is not designed to handle logs. Try Loki, or rsyslog along with
grok exporter to translate logs into metrics.

On Mon, Mar 2, 2020, 5:03 AM Stuart Clark <[email protected]> wrote:

> On 2020-03-02 11:00, Julian Ade Putra wrote:
> > Hello Experts,
> >
> > I have access log that contains API list and status code that keep
> > updating base on the transaction. May i know what is the best method
> > to read it as metric in Prometheus?
> > Below the format of access log :
>
>
> You can use a tool suck as mtail or the grok-exporter to create metrics
> from a log file
>
> >
> > 2020-03-02      14:38:44        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a11   0:13
> > /oem/proxy_services/inbound_sync_process_http_prepaid   200     514
> > 2020-03-02      14:38:49        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a13   0:17
> > /oem/proxy_services/inbound_sync_process_http_prepaid   200     7831
> > 2020-03-02      14:38:51        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a15   0:13
> > /oem/proxy_services/inbound_sync_process_http_prepaid   200     306
> > 2020-03-02      14:39:02        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a18   0:5
> > /Catalyst/ProxyServices/NotificationActivityProxyService        200
> >  770
> > 2020-03-02      14:39:03        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a19   0:11
> > /oem/proxy_services/inbound_sync_process_http_postpaid  200     777
> > 2020-03-02      14:39:03        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a1a   0:16
> > /oem/proxy_services/inbound_sync_process_http_postpaid  200     2793
> > 2020-03-02      14:39:03        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a1b   0:13
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  713
> > 2020-03-02      14:39:03        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a1d   0:13
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  713
> > 2020-03-02      14:39:04        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a1e   0:13
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  713
> > 2020-03-02      14:39:04        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a1f   0:13
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  714
> > 2020-03-02      14:39:06        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a21   0:13
> > /oem/proxy_services/inbound_sync_process_http_prepaid   200     1923
> > 2020-03-02      14:39:10        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a24   0:17
> > /oem/proxy_services/inbound_sync_process_http_prepaid   200     5013
> > 2020-03-02      14:39:15        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a27   0:14
> > /oem/proxy_services/inbound_sync_process_http_postpaid  200     49994
> > 2020-03-02      14:39:16        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a28   0:12
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  2577
> > 2020-03-02      14:39:16        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a2a   0:15
> > /oem/proxy_services/inbound_sync_process_http_prepaid   200     4556
> > 2020-03-02      14:39:17        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a2b   0:15
> > /oem/proxy_services/inbound_sync_process_http_prepaid   200     307
> > 2020-03-02      14:39:21        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a2c   0:15
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  643
> > 2020-03-02      14:39:22        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a20   0:13
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  713
> > 2020-03-02      14:39:22        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a1c   0:13
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  716
> > 2020-03-02      14:39:23        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a2e   0:15
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  643
> > 2020-03-02      14:39:28        POST
> > 89218a53-181b-4ef3-bd64-cc159832accc-00021a30   0:15
> > /oem/proxy_services/inbound_sync_process_eai_http_prepaid       200
> >  899
> >
> > Thanks,
> > Julian
> >
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Prometheus Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> > an email to [email protected].
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/prometheus-users/a5750a63-3da7-4496-bd40-4a3b6ea70e28%40googlegroups.com
> > [1].
> >
> >
> > Links:
> > ------
> > [1]
> >
> https://groups.google.com/d/msgid/prometheus-users/a5750a63-3da7-4496-bd40-4a3b6ea70e28%40googlegroups.com?utm_medium=email&utm_source=footer
>
> --
> Stuart Clark
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/e1e458739027cf26b568b718473c376c%40Jahingo.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAKimyZsAO6rO66XvjJOkcSkeYW54D1mjcaTWsHc%3Dfi%2BqmvHMLQ%40mail.gmail.com.

Reply via email to