create systemctl init script xymon client
list Enzo Arroyo
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
list Josh Luthman
There's a package floating around that takes care of everything and includes the sys ctl scripts. Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX
▸
On Sep 20, 2016 6:51 PM, "Enzo Arroyo" <user-21625dccbb62@xymon.invalid> 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
list Galen Johnson
?I think JC has it in his rhel 7 rpms from Terabithia. =G=
▸
From: Xymon <xymon-bounces at xymon.com> on behalf of Josh Luthman <user-4c45a83f15cb@xymon.invalid>
Sent: Tuesday, September 20, 2016 7:02 PM
To: Enzo Arroyo
Cc: xymon at xymon.com
Subject: Re: [Xymon] create systemctl init script xymon client
There's a package floating around that takes care of everything and includes the sys ctl scripts.
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
On Sep 20, 2016 6:51 PM, "Enzo Arroyo" <user-21625dccbb62@xymon.invalid<mailto:user-21625dccbb62@xymon.invalid>> 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<http://sync.arroyof.com>.12374 2>&1; mv /home/xymon/client/tmp/xymon_vmstat.live-sync.arroyof.com<http://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<http://sync.arroyof.com>.12470 2>&1; mv /home/xymon/client/tmp/xymon_vmstat.live-sync.arroyof.com<http://sync.arroyof.com>.12470 /home/xymon/client/tmp/xymon_vmstat.live-sync.... ??12504 vmstat 300 2 Thank you, best regards
list Josh Luthman
That name sounds familiar. Works with CentOS for sure.
▸
Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX
▸
On Sep 20, 2016 9:41 PM, "Galen Johnson" <user-87f955643e3d@xymon.invalid> wrote:
I think JC has it in his rhel 7 rpms from Terabithia. =G= *From:* Xymon <xymon-bounces at xymon.com> on behalf of Josh Luthman < user-4c45a83f15cb@xymon.invalid> *Sent:* Tuesday, September 20, 2016 7:02 PM *To:* Enzo Arroyo *Cc:* xymon at xymon.com *Subject:* Re: [Xymon] create systemctl init script xymon client There's a package floating around that takes care of everything and includes the sys ctl scripts. Josh Luthman Office: XXX-XXX-XXXX Direct: XXX-XXX-XXXX XXXX Wayne St Suite XXXX Troy, OH XXXXX On Sep 20, 2016 6:51 PM, "Enzo Arroyo" <user-21625dccbb62@xymon.invalid> 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.se rvice):
▸
# 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