[Xymon] create systemctl init script xymon client

Josh Luthman josh at imaginenetworksllc.com
Wed Sep 21 01:02:28 CEST 2016


There's a package floating around that takes care of everything and
includes the sys ctl scripts.

Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373

On Sep 20, 2016 6:51 PM, "Enzo Arroyo" <enzo at arroyof.com> wrote:

> Hello,
>
> Please can somebody help me?, I need to create a init script in centos 7,
> I’m installed from sources, my path is:
>
> /home/xymon/client/runclient.sh
>
> I create a systemctl script with this (/etc/systemd/system/xymond.
> service):
>
> ------------------------------------------------------------
> ----------------------------------
> # xymond.service
> # systemd file for Fedora 18 and up, or RHEL 7 and up
>
> [Unit]
> Description=Xymon is the service for monitoring system
> Documentation=man:xymon(7) man:xymonlaunch(8) man:xymon(1)
> After=network.target
>
> [Install]
> # Compatibility with "xymon" and "xymon-client"
> #Alias=xymond.service
> WantedBy=multi-user.target
>
> [Service]
> #EnvironmentFile=/etc/sysconfig/xymonlaunch
> User=xymon
> # We wrap in xymoncmd to eliminate the need for the bulk of the old init
> script
> ExecStart=/home/xymon/client/runclient.sh
> #ExecStop=/home/xymon/client/runclient.sh stop
> Type=simple
>
> # Kill xymonlaunch, but don't send kills to the underlying procs, since
> they
> # might be doing important things (like writing checkpoints and flushing
> caches)
> KillMode=process
> # SendSIGHUP=yes
> SendSIGKILL=no
> ------------------------------------------------------------
> ----------------------------------
>
> But not start:
>
> ------------------------------------------------------------
> ----------------------------------
> xymond.service - Xymon is the service that work with the Corpresa
> monitoring system
>    Loaded: loaded (/etc/systemd/system/xymond.service; enabled; vendor
> preset: disabled)
>    Active: inactive (dead) since mar 2016-09-20 17:15:39 EDT; 1min 3s ago
>      Docs: man:xymon(7)
>            man:xymonlaunch(8)
>            man:xymon(1)
>   Process: 12573 ExecStart=/home/xymon/client/runclient.sh (code=exited,
> status=0/SUCCESS)
>  Main PID: 12573 (code=exited, status=0/SUCCESS)
>    CGroup: /system.slice/xymond.service
>            ├─12410 sh -c vmstat 300 2 1>/home/xymon/client/tmp/
> xymon_vmstat.live-sync.arroyof.com.12374 2>&1; mv
> /home/xymon/client/tmp/xymon_vmstat.live-sync.arroyof.com.12374
> /home/xymon/client/tmp/xymon_vmstat.live-sync....
>            ├─12412 vmstat 300 2
>            ├─12502 sh -c vmstat 300 2 1>/home/xymon/client/tmp/
> xymon_vmstat.live-sync.arroyof.com.12470 2>&1; mv
> /home/xymon/client/tmp/xymon_vmstat.live-sync.arroyof.com.12470
> /home/xymon/client/tmp/xymon_vmstat.live-sync....
>            └─12504 vmstat 300 2
> ———————————————————————————————————————————————
>
> Thank you, best regards
>
>
> _______________________________________________
> 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/20160920/3a2f6991/attachment.html>


More information about the Xymon mailing list