[Xymon] Anyone have a good systemd script they would like to share?

Galen Johnson solitaryr at gmail.com
Thu May 31 22:02:14 CEST 2018


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: david.gore at verizon.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?
> 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: +1 919-378-3676 M: +1 919-200-3263
> SMS: mailto:9192003263 at vzwpix.com
> email: gsps at verizon.com
>
>
>
>
>
>
> ---------- 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?
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20180531/3a86cee5/attachment.html>


More information about the Xymon mailing list