The Terabithia RPMs have a systemd unit file included. If you have a RHEL
based system, you could start there.
=G=
On Thu, May 31, 2018 at 11:33 AM David Gore via Xymon <xymon at xymon.com>
wrote:
---------- Forwarded message ----------
From: user-368fd67cc6bd@xymon.invalid
To: "xymon at xymon.com" <xymon at xymon.com>
Cc:
Bcc:
Date: Thu, 31 May 2018 14:56:02 +0000
Subject: [Xymon] Anyone have a good systemd script they would like to
share?
I have created the following systemd file. This works to
stop/start/restart/status/reload xymon except for dbcheck.
I see this in the logs and dbcheck fails to connect to any DB instance:
Thu May 31 13:49:19 2018:ERROR: ORA-12154: TNS:could not resolve the
connect identifier specified (DBD ERROR: OCIServerAttach)
I also created a global environment file which didn't help.
/home/xymon/server/bin/xymon.sh always works, systemctl restart xymon
always fails to have dbcheck.pl to work as expected.
Perhaps I should be using something else to monitor Oracle instances? The
script is available here, if you are not aware of dbcheck.pl.
https://sourceforge.net/projects/hobbit-perl-cl/
Anyone using dbcheck.pl with a systemd stop/start file?
[xymon at xymon1 ext]$ cat /etc/profile.d/oracle_env.sh
ORACLE_HOME=/usr/lib/oracle/12.2/client64
TNS_ADMIN=/home/xymon/server/ext/impact/db/etc
PATH=$ORACLE_HOME/bin:$PATH
if test "$LD_LIBRARY_PATH" = ""
then
LD_LIBRARY_PATH=$ORACLE_HOME/lib
else
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
fi
export LD_LIBRARY_PATH ORACLE_HOME TNS_ADMIN PATH
[xymon at xymon1 tmp]$ cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)
[xymon at xymon1 tmp]$ cat /etc/systemd/system/xymon.service
[Unit]
Description=Xymon Monitoring Service
After=network.target
[Service]
Type=forking
User=xymon
ExecStart=/home/xymon/server/bin/xymon.sh start
ExecStop=/home/xymon/server/bin/xymon.sh stop
ExecReload=/home/xymon/server/bin/xymon.sh reload
Restart=on-failure
RestartSec=42s
[Install]
WantedBy=multi-user.target
David W Gore
Global Surveillance Production Support (GSPS)
O: +X XXX-XXX-XXXX M: +X XXX-XXX-XXXX
SMS: mailto:user-de2e81e86bca@xymon.invalid
email: user-50e1bc591083@xymon.invalid
---------- Forwarded message ----------
From: David Gore via Xymon <xymon at xymon.com>
To: "xymon at xymon.com" <xymon at xymon.com>
Cc:
Bcc:
Date: Thu, 31 May 2018 14:56:02 +0000
Subject: [Xymon] Anyone have a good systemd script they would like to
share?