Hitachi

JP1 Version 13 JP1/Integrated Management 3 - Manager Command, Definition File and API Reference


Process exporter configuration file (jpc_process_exporter.yml)

Organization of this page

Syntax

Written in YAML format.

process_names:
  - name: "{{.ExeBase}};{{.Username}};{{.Matches.cmdline}}"
    cmdline: 
    - (?P<cmdline>.*)

File

jpc_process_exporter.yml

jpc_process_exporter.yml.model (Model file)

Storage directory

For Windows
When using a physical host

Agent-path\conf\

When using a logical host

shared-folder\jp1ima\conf\

For Linux
When using a physical host

/opt/jp1ima/conf/

When using a logical host

shared-directory/jp1ima/conf/

Description

The configuration file that determines the behavior of Process exporter.

Character encoding

UTF-8 (without BOM)

Linefeed code

In Windows: CR+LF

In Linux: LF

Timing in which definitions are reflected

When Process exporter is restarted.

Content description

Item#

Description

Modifiable

Content set by the user in JP1/IM - Agent

Default value in JP1/IM - Agent

process_names

--

--

--

--

-

[name]

Each item in process_names gives a recipe for identifying and naming processes. The optional name tag defines a template to use to name matching processes; if not specified, name defaults to {{.ExeBase}}.

  • {{.Comm}} contains the basename of the original executable, i.e. 2nd field in /proc/<pid>/stat

  • {{.ExeBase}} contains the basename of the executable

  • {{.ExeFull}}contains the fully qualified path of the executable

  • {{.Username}} contains the username of the effective user

  • {{.Matches}} map contains all the matches resulting from applying cmdline regexps

  • {{.PID}} contains the PID of the process. Note that using PID means the group will only contain a single process.

  • {{.StartTime}} contains the start time of the process. This can be useful in conjunction with PID because PIDs get reused over time.

  • {{.Cgroups}} contains (if supported) the cgroups of the process (/proc/self/cgroup). This is particularly useful for identifying to which container a process belongs.

Y

Specify this to change the process name to a value other than the default value (executable file name).

{{.ExeBase}};{{.Username}};{{.Matches.cmdline}}

<selector>

comm, exe or cmdline.

If more than one selector is present, they must all match.

REQ

Monitored process selector

cmdline

-

<any>

For "comm" and "exe", the list of strings is an OR, meaning any process matching any of the strings will be added to the item's group.

For "cmdline", the list of regexes is an AND, meaning they all must match. Any capturing groups in a regexp must use the ?P<name> option to assign a name to the capture, which is used to populate ".Matches".

  • comm

    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.

    ex) bash

  • exe

    exe is argv[0]. If no slashes, only basename of argv[0] need match. If exe contains slashes, argv[0] must match exactly.

    ex) /usr/local/bin/prometheus

  • cmdline

    cmdline is a list of regexps applied to argv. Each must match, and any captures are added to the ".Matches" map.

    Specify this within 4,096 bytes.

    For details on the process_exporter arguments, see process_exporter command options.

    ex)

    - name: "{{.ExeFull}}:{{.Matches.Cfgfile}}"

    exe:

    - /usr/local/bin/process-exporter

    cmdline:

    - -config.path\s+(?P<Cfgfile>\S+)

REQ

Monitored process selector value

- (?P<cmdline>.*)

Legend:

REQ: Required setting, Y: Modifiable, --: Not applicable

#

Brackets ([]) denote optional items.

Legend:

Y: Modifiable, --: Not applicable