Unit definition file (jpc_program-name.service)
- Organization of this page
Format
-
For JP1/IM agent control base (imagent, imagentproxy, imagentaction) and OSS#1 servicesthat do not support the add-on administration function
[Unit] Description = Unit description After=local-fs.target remote-fs.target rsyslog.service network.target [Service] WorkingDirectory = Working directory ExecStart = /bin/sh -c 'Program Command Line |& (trap "" 15 && exec install-directory/jp1ima/bin/rotatelogs -n 8#2 log output directory#3 10240K)' Type = simple Restart=no User=root TimeoutStopSec=Termination timeout period LimitNOFILE=65536#4 Environment=SIGDUMP_PATH=-#4 [Install] WantedBy=multi-user.target graphical.target
-
For OSS#1 servicesthat support the add-on administration function
[Unit] Description = Unit description After=local-fs.target remote-fs.target rsyslog.service network.target [Service] WorkingDirectory = Working directory ExecStart = /bin/sh -c '/opt/jp1ima/bin/osswrapper Program Command Line |& (trap "" 15 && exec install-directory/jp1ima/bin/rotatelogs -n 8#2 log output directory#3 10240K)' Type = simple Restart=no User=root TimeoutStopSec=Termination timeout period LimitNOFILE=65536#4 Environment=SIGDUMP_PATH=-#4 Environment=IMA_OSSWRAPPER_RESTART_INTERVAL=interval-at-which-OSS-wrapper-restarts-processes#5 [Install] WantedBy=multi-user.target graphical.target
- #1
-
For details about OSS corresponding to add-on administration funciton, see 3.15 Monitoring function by JP1/IM - Agent in the JP1/Integrated Management 3 - Manager Overview and System Design Guide.
- #2
-
Specify "100" only for unit definition file of Fluentd.
- #3
-
The log-destination directory that is setup as the default value varies depending on the program. For the path of the default value, see List of files/directories that can be viewed/edited by the user in JP1/IM - Agent of integrated agent host (Linux) in Appendix A.4(4) Integrated agent host (Linux) in the JP1/Integrated Management 3 - Manager Overview and System Design Guide.
- #4
-
Described only for unit definition file of Fluentd.
- #5
-
Specifies in hours the value of the environment-variable IMA_OSSWRAPPER_RESTART_INTERVAL (interval-at-which-OSS-wrapper-restarts-processes).
Allowed values are.: 0... 2160 (90 days). The default value is 0.
OSS does not restart processing in the following cases:
-
When this environment variable is not set
-
When 0 is specified as the value of this environment variable
-
Cannot convert the specified value to an integer value
-
When a value outside the specifiable range is specified
Restarts OSS process when the default-value or specified-value period elapses, starting immediately before OSS process is started.
-
Description
This is a definition file for registering programs in systemctl in the Linux environment.
File
-
For a physical host
jpc_program-name.service
jpc_program-name.service.model (model file)
-
For a logical host
jpc_program-name_logical-host-name.service
Storage directory
- ■Integrated agent host
-
-
For a physical host (Model File storage destination)
/opt/jp1ima/conf/
-
For Physical host and Logical host (storage destination of definition file)
/usr/lib/systemd/system/
-
The target of the installation is as follows:
|
Target name |
Description |
|---|---|
|
multi-user.target |
runlevel=3 Multi-user mode (text login) |
|
graphical.target |
runlevel=5 Multi-user mode (graphical login) |
Character code
UTF-8 (without BOM)
Line feed code
LF
When the definitions are applied
It is reflected when you run the systemctl daemon-reload command.
Information that is specified
The startup order of the services on which the Prometheus server, Alertmanager, and Exporter depend is shown below.
-
For Prometheus server
Startup order of dependent services
Description
local-fs.target
Local File System
remote-fs.target
Remote File System
rsyslog.service
rsyslog
-
For Exporter, and Alertmanager, Fluentd, imagent, imagentproxy, imagentaction
Startup order of dependent services
Description
local-fs.target
Local File System
remote-fs.target
Remote File System
rsyslog.service
rsyslog
network.target
Network
The ending timeout period is shown below.
|
Types of programs |
End timeout period (in seconds) |
|---|---|
|
Prometheus server |
110 |
|
Alertmanager |
60 |
|
Node exporter |
|
|
Blackbox exporter |
|
|
Yet another cloudwatch exporter |
|
|
process_exporter |
|
|
promitor_scraper |
|
|
promitor_resource_discovery |
|
|
script_exporter |
|
|
Fluentd |
|
|
OracleDB exporter |
|
|
VMware exporter |
|
|
imagent |
140 |
|
imagentproxy |
|
|
imagentaction |
60 |
The following are the areas that you can change:
-
If you want to change command line options
Edit ExecStart line.
■For Prometheus server
For the parameters of prometheus command, see the description of prometheus command options in Service definition file (jpc_program-name_service.xml).
■For Alertmanager
For the parameters of alertmanager command, see the description of alertmanager command options in Service definition file (jpc_program-name_service.xml).
■For Node exporter
For the parameters of the node_exporter command, see the description of node_exporter command options.
■For Yet another cloudwatch exporter
For the parameters of the yet-another-cloudwatch-exporter command, see the description of yet-another-cloudwatch-exporter command options.
■For Process exporter
For the parameters of the process_exporter command, see the description of process_exporter command options in Process exporter configuration file (jpc_process_exporter.yml).
■For Primitor
No specifiable options for the promitor_scraper command and promitor_resource_discovery command.
■For Script exporter
For the parameters of the script_exporter command, see the description of script_exporter command options in Service definition file (jpc_program-name_service.xml).
■For OracleDB exporter
For the parameters of the oracledb_exporter command, see the description of oracledb_exporter command options in Service definition file (jpc_program-name_service.xml).
■VMware exporter
For the parameters of the vmware_exportercommand, see the description of vmware_exporter command options in Service definition file (jpc_program-name_service.xml).
-
To change the number of log sectors
Edit the value after the -n option on the ExecStart line. The number of log sectors that can be specified is 8 to 512.
-
To change log size
Edit the value at the end of the ExecStart line.
-
If you want to change the log output destination
Edit the log output directory specified by the rotatelogs argument.
-
If you want the process to be restarted automatically when it stops abnormally, specify "always" for Restart. If the process is not restarted automatically, such as in a cluster configuration, specify "no" for Restart.
The options for the node_exporter command and the yet-another-cloudwatch-exporter command are shown below.
-
node_exporter command options
Items related to collectors can be enabled with the "--collector.collector name" flag. To invalidate entries for collectors, specify the "--no-collector.collector name" flag.
Item
Description
Changeability
What You Setup in Your JP1/IM - Agent
JP1/IM - Agent Defaults Value
--collector.cpu.info
Enable the collection of node_cpu_info metrics.
Specify the ,--collector.cpu.info if you want to enable it.
Specify the ,--no-collector.cpu.info if you want to disable it.
Y
--
--collector.cpu.info
--collector.filesystem.ignored-mount-points
Specifies the regular expression for mount points to ignore in the FileSystem collector.
Y
Regular expressions for mount points to ignore in the FileSystem collector
--collector.filesystem.ignored-mount-points="^/(dev|proc|sys|var/lib/docker/.+)($|/)"
--collector.filesystem.ignored-fs-types
Specifies a regular expression for file system types to be ignored by the FileSystem collector.
Y
Regular expressions for mount points to ignore in the FileSystem collector
--collector.filesystem.ignored-fs-types="^/(dev|proc|sys|var/lib/docker/.+)($|/)"
--collector.netstat.fields
Specifies the regular expression for the field to return to the netstat collector.
Y
Regular expression for fields to return to the netstat collector
--collector.netstat.fields="^(.*_(InErrors|InErrs)|Ip_Forwarding|Ip(6|Ext)_(InOctets|OutOctets)|Icmp6?_(InMsgs|OutMsgs)|TcpExt_(Listen.*|Syncookies.*|TCPSynRetrans)|Tcp_(ActiveOpens|InSegs|OutSegs|OutRsts|PassiveOpens|RetransSegs|CurrEstab)|Udp6?_(InDatagrams|OutDatagrams|NoPorts|RcvbufErrors|SndbufErrors))$"
--path.procfs
Specifies the procfs mount point.
Y
The procfs mount point
--path.procfs="/proc"
--path.sysfs
Specifies the sysfs mount point.
Y
The sysfs mount point
--path.sysfs="/sys"
--path.rootfs
Specifies the rootfs mount point.
Y
The rootfs mount point
--path.rootfs="/"
--collector.systemd.unit-include
Specify the unit filename of Systemd to be monitored by the service monitoring function in regular expressions.
The default is an empty character and no service is monitored. If the regular expressions are incorrect, Node exporter fails to start servicing.
Depending on how the regular expression is specified, it may take time to collect performance information. For details, see Appendix G.4 Tips on using regular expressions in the JP1/Integrated Management 3 - Manager Overview and System Design Guide.
Y
Regular expression that matches the unit file name
--collector.systemd.unit-include=""
--collector.cpu
Enable the cpu collector.
If enabled,-- specify collector.cpu.
If you want to disable it,-- specify no-collector.cpu.
Y
--
--collector.cpu
--collector.diskstats
Enable the diskstats collector.
If enabled,-- specify collector.diskstats.
To disable it,-- specify no-collector.diskstats.
Y
--
--collector.diskstats
--collector.filesystem
Enable the FileSystem collector.
If enabled,-- specify collector.filesystem.
If disabled,-- specify no-collector.filesystem.
Y
--
--collector.filesystem
--collector.loadavg
Enable the loadavg collector.
If enabled,-- specify collector.loadavg.
If you want to disable it,-- specify no-collector.loadavg.
Y
--
--collector.loadavg
--collector.meminfo
Enable the meminfo collector.
If enabled,-- specify collector.meminfo.
To disable it,-- specify no-collector.meminfo.
Y
--
--collector.meminfo
--collector.netclass
Enable the netclass collector.
If enabled,-- specify collector.netclass.
If disabled,-- specify no-collector.netclass.
Y
--
--collector.netclass
--collector.netdev
Enable the netdev collector.
If enabled,-- specify collector.netdev.
If disabled,-- specify no-collector.netdev.
Y
--
--collector.netdev
--collector.netstat
Enable the netstat collector.
If enabled,-- specify collector.netstat.
To disable it,-- specify no-collector.netstat.
Y
--
--collector.netstat
--collector.nfs
Enable the nfs collector.
If enabled,-- specify collector.nfs.
To disable it,-- specify no-collector.nfs.
Y
--
--collector.nfs
--collector.nfsd
Enable the nfsd collector.
If enabled,-- specify collector.nfsd.
To disable it,-- specify no-collector.nfsd.
Y
--
--collector.nfsd
--collector.stat
Enable the stat collector.
If enabled,-- specify collector.stat.
To disable it,-- specify no-collector.stat.
Y
--
--collector.stat
--collector.systemd
Enable systemd collector.
When enabled, specifies --collector.systemd.
When disabled, specifies --nocollector.systemd.
Y
--
--collector.systemd
--collector.time
Enable the time collector.
If enabled,-- specify collector.time.
To disable it,-- specify no-collector.time.
Y
--
--collector.time
--collector.uname
Enable the uname collector.
If enabled,-- specify collector.uname.
To disable it,-- specify no-collector.uname.
Y
--
--collector.uname
--collector.vmstat
Enable the vmstat collector.
If enabled,-- specify collector.vmstat.
To disable it,-- specify no-collector.vmstat.
Y
--
--collector.vmstat
--web.listen-address
Specify the listening port. If you want to limit the listening IP address, also include the host name or IP address. If you specify a host name, you can specify up to 255 bytes.
If you specify a host name for this option, you must set the same host name as this option to the targets of Node exporter discovery configuration file (jpc_file_sd_config_node.yml) on the same host, and you must restart or reload the Prometheus server.
If you specify an IP address for this option, you must set the host name that resolves to the same IP address as this option to the targets of Node exporter discovery configuration file (jpc_file_sd_config_node.yml) on the same host, and you must restart or reload the Prometheus server.
<Configuration Example>
To accept requests for all IP addresses, set the following:
--web.listen-address=":20716"
If you want to limit the IP addresses that are accepted, you can specify a host name or an IP address as follows:
--web.listen-address="host-name-or-IP-address:20716"
Y
Specify this when you want to change the port or limit the listening IP address.
--web.listen-address=":20716"
--web.max-requests
Specifies the maximum number of scrape requests to accept at the same time.
N
--
--web.max-requests=40
--log.level=info
Only messages above the specified level are logged.
You can specify one of the following levels: debug, info, warn, or error.
N
Change Setup when you are prompted to change Value from the support desk.
Normally, no change is required.
--log.level=debug
- Legend:
-
Y: Changeable, N: Not changeable, --: Not applicable
-
process_exporter command options
Item
Description
Changeability
What You Setup in Your JP1/IM - Agent
JP1/IM - Agent Defaults Value
-web.listen-address
Specify the listening port.
If omitted, ":9256" is assumed.
Y
Specify this when you want to change the port or limit the listening IP address.
20721
-procnames
comma-separated list of process names to monitor.
Specify the comm field value in /proc//stat as the process name. Process names cut off at 15 characters.
Y
--
Not specified
-procfs
Specify /proc pass.
If the specification is omitted, "/proc" is assumed
Y
--
Not specified
-namemapping
Specifies the mapping (naming convention) of process names.
Specify names and regular expressions separated by commas. If the renamed name is not listed in procnames, it is ignored.
<Setting example>
-namemapping "python2,([^/]+).py,java,-jar\s+([^/]+).jar"
Y
--
Not specified
-config.path
Specifies configuration file pathname of Process exporter.
<Setting example>
- name: "{{.ExeFull}}:
{{.Matches.Cfgfile}}"
exe:
- /usr/local/bin/process-exporter
cmdline:
- -config.path\s+(?P<Cfgfile>\S+)
If more than one value is specified, OR condition is used for comm and exe, and AND condition is used for cmdline.
Y
--
installation-directory/jp1ima/conf/jpc_process_exporter.yml
- Legend:
-
Y: Changeable, --: Not applicable
-
yet-another-cloudwatch-exporter command options
Item
Description
Changeability
What You Setup in Your JP1/IM - Agent
JP1/IM - Agent Defaults Value
-cloudwatch-concurrency
Specify the maximum number of concurrent requests to the Amazon CloudWatch API.
Y
Maximum concurrent requests
-cloudwatch-concurrency=5
-config.file
Specify the path to the Yet another cloudwatch exporter configuration file.
Y
--
-config.file="Agent-path/jp1ima/conf/jpc_ya_cloudwatch_exporter.yml"
-fips
Specify this in when using API of FIPS compliant Amazon Web Services (AWS)#.
- #:
-
This should be specified, for example, if your security requirements require compliance with Federal Information Processing Standard (FIPS) 140-2).
Y
Specify if you want to enable it.
Do not specify (do not enable)
-listen-address
Specify the listening port. If you want to limit the listening IP address, also include the host name or IP address. If you specify a host name, you can specify up to 255 bytes.
If you specify a host name for this option, you must set the same host name as this option to the targets of Yet another cloudwatch exporter discovery configuration file (jpc_file_sd_config_cloudwatch.yml) on the same host, and you must restart or reload the Prometheus server.
If you specify an IP address for this option, you must set the host name that resolves to the same IP address as this option to the targets of Yet another cloudwatch exporter discovery configuration file (jpc_file_sd_config_cloudwatch.yml) on the same host, and you must restart or reload the Prometheus server.
<Configuration Example>
To accept requests for all IP addresses, set the following:
-listen-address=":20718"
If you want to limit the IP addresses that are accepted, you can specify a host name or an IP address as follows:
-listen-address="host-name-or-IP-address:20718"
Y
Specify this when you want to change the port or limit the listening IP address.
-listen-address=":20718"
-metrics-per-query
Specifies the number of metrics created in a single GetMetricsData request.
Y
Normally, you don't change it.
-metrics-per-query=500
-tag-concurrency
Specifies the maximum number of concurrent requests to the Resource Tagging API.
Y
Normally, you don't change it.
-tag-concurrency=5
- Legend:
-
Y: Changeable, --: Not applicable