process-exporter setup

156 views
Skip to first unread message

Danny de Waard

unread,
Jun 25, 2021, 6:01:56 AM6/25/21
to Prometheus Users
Maybe not the correct group but i want to count certain processes with process-exporter. But i can't seem to figure out how to seperate them.

I do a simple search now with this config:
process_names:
# comm is the second field of /proc/<pid>/stat minus parens.
# It is the base executable name, truncated at 15 chars.
# It cannot be modified by the program, unlike exe.
  - comm:
    - java
    - node_exporter
    - process-exporte
    - java8
    - Agent.Listner
    - splunkd
    - tee

But what i want is a seperation of java processes on a argument.

So i have some processes like:
/usr/bin/sh -c /usr/lib/jvm/jre-11-openjdk/bin/java <parameterA>
/usr/bin/sh -c /usr/lib/jvm/jre-11-openjdk/bin/java <parameterB>
/usr/lib/jvm/jre-11-openjdk/bin/java <parameterC>
/usr/lib/jvm/jre-11-openjdk/bin/java <parameterD>

How do i count/monitor them seperatly?

Should i do something with:
  - name: "{{.Comm}}<and_more>"
    cmdline:
    - '.+<some_regex>'

Ian Billett

unread,
Jun 28, 2021, 12:46:07 PM6/28/21
to Danny de Waard, Prometheus Users
Hi Danny,

I would recommend raise that question directly with the upstream repo - you are much more likely to get an answer than in this much wider group :)

Best,

Ian

--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3b69bd63-3151-482c-ba7c-8dd6c55a8b29n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages