1.22.2 Upgrading JP1/IM - Agent
Although you can upgrade JP1/IM - Agent on already created containers, we recommend that you use the new version of JP1/IM - Agent to create Docker and Podman images and recreate the containers from the new container images.
Follow the steps below to upgrade JP1/IM - Agent on the containers you have already created.
- Organization of this subsection
(1) When upgrading JP1/IM - Agent from a pre-13-11 version on a container that has already been created
- Stopping JP1/IM - Agent
Before upgrading JP1/IM - Agent on a container that you have already created, stop JP1/IM - Agent service in the service management tools.
- Updating service definition file
When you upgrade and install JP1/IM - Agent on a container from a version earlier than 13-11 to a version 13-11 or later, unit definition file model files that exist in /opt/jp1ima/conf folder are updated. Manually reconfigure the command line that appears on ExecStart line of this model file as a command line that runs on the serviced management tools. Also replace "@@installdir1@@" and "@@installdir2@@" with "/opt".
If the command-line begins with "/bin/sh-c 'xxxxxxxx", modify it as in "/bin/sh-c 'trap "" 15; xxxxxxxx".
This manual uses supervisord as a serviced management tools. Here is a sample command-line change for Prometheus server listed in service definition file of supervisord: Add the underlined text.
-
Before change
[program:prometheus] command=/bin/sh -c '"/opt/jp1ima/bin/prometheus" --config.file="/opt/jp1ima/conf/jpc_prometheus_server.yml" --web.listen-address="0.0.0.0:20713" --web.read-timeout=5m --web.max-connections=10 --web.enable-lifecycle --storage.tsdb.path="/opt/jp1ima/data/prometheus_server/" --storage.tsdb.retention.time=1h --storage.tsdb.min-block-duration=1h --storage.tsdb.max-block-chunk-segment-size=32MB --storage.remote.flush-deadline=5s --rules.alert.for-outage-tolerance=1h --rules.alert.for-grace-period=10m --rules.alert.resend-delay=1m --alertmanager.notification-queue-capacity=10000 --log.level=debug --log.format=logfmt |& ( trap "" 15 && exec "/opt/jp1ima/bin/rotatelogs" -n 8 "/opt/jp1ima/logs/prometheus_server/prometheus_service" 10240K)' directory=/opt/jp1ima/bin autostart=true stopasgroup=true stopwaitsecs=180
-
After change
[program:prometheus] command=/bin/sh -c '/opt/jp1ima/bin/osswrapper "/opt/jp1ima/bin/prometheus" --config.file="/opt/jp1ima/conf/jpc_prometheus_server.yml" --web.listen-address="0.0.0.0:20713" --web.read-timeout=5m --web.max-connections=10 --web.enable-lifecycle --storage.tsdb.path="/opt/jp1ima/data/prometheus_server/" --storage.tsdb.retention.time=1h --storage.tsdb.min-block-duration=1h --storage.tsdb.max-block-chunk-segment-size=32MB --storage.remote.flush-deadline=5s --rules.alert.for-outage-tolerance=1h --rules.alert.for-grace-period=10m --rules.alert.resend-delay=1m --alertmanager.notification-queue-capacity=10000 --log.level=debug --log.format=logfmt |& ( trap "" 15 && exec "/opt/jp1ima/bin/rotatelogs" -n 8 "/opt/jp1ima/logs/prometheus_server/prometheus_service" 10240K)' directory=/opt/jp1ima/bin autostart=true stopasgroup=true stopwaitsecs=180