Unit definition file (jpc_program-name.service)
- Organization of this page
Format
[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#1 log output directory#2 10240K)' Type = simple Restart=no User=root TimeoutStopSec=Termination timeout period LimitNOFILE=65536#3 Environment=SIGDUMP_PATH=-#3 [Install] WantedBy=multi-user.target graphical.target
- #1
-
Specify "100" only for unit definition file of Fluentd.
- #2
-
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.
- #3
-
Described only for unit definition file of Fluentd.
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 |
|
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 prometheus command options in Service definition file (jpc_program-name_service.xml).
■For Node exporter for AIX
For the arguments of the Node exporter command, see the description of "node_exporter command options" below.
■For Node exporter
About arguments of the node_exporter command, see node_exporter command options.
■For Yet another cloudwatch exporter
About arguments of the yet-another-cloudwatch-exporter command, see yet-another-cloudwatch-exporter command options.
■For Process exporter
For the parameters of 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 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 arguments of oracledb_exporter command, see the description of oracledb_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 more information, 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 internet address. If you specify a host name, you can specify up to 255 bytes.
If a host name is specified for this option, the targets of the Node exporter's discovery configuration file (jpc_file_sd_config_node.yml) on the same host must be set to the same host name as this option, and the Prometheus server must be restarted or reloaded.
If an internet address is specified for this option, the targets of the Node exporter's discovery configuration file (jpc_file_sd_config_node.yml) on the same host must be set to a host name that resolves to the same IP address as this option, and the Prometheus server must be restarted or reloaded.
<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 internet address as follows:
--web.listen-address="hostname 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
-
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 internet address. If you specify a host name, you can specify up to 255 bytes.
If you specify Host name for this option, you must Setup the same Host name as this option to targets of Yet another cloudwatch exporter discovery configuration file (jpc_file_sd_config_cloudwatch.yml) Yet another cloudwatch exporter discovery configuration file on the same host, and Restart or Reload Prometheus server.
If you specify IP address for this option, you must Yet another cloudwatch exporter discovery configuration file (jpc_file_sd_config_cloudwatch.yml) targets on the same host, Setup Host name that resolves to the same IP address as this option and Restart or Reload 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 internet address as follows:
-listen-address="hostname 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