clientlaunch.cfg: CRONDATE problem / error?
list Becker Christian
Hello out there,
we are using Xymon 4.3.7 as xymon server. There is a particular client running Ubuntu 9.04 as operating system and Xymon 4.3.7 as client, reporting successfully to the Xymon server.
I have been in the need to write a script that is running on a fixed time of a day. Therefore I configured the script in the clientlaunch.cfg on the client as follows:
[xymoncheckscript-custom]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/xymoncheckscript-custom.sh
LOGFILE $XYMONCLIENTHOME/logs/ xymoncheckscript-custom.log
CRONDATE 0 11 * * *
When restarting the xymon services on the client I get the following entry in clientlaunch.log:
2012-06-13 10:58:53 Can't parse cron date: xymoncheckscript-custom->0 11 * * *
The man page of tasks.cfg has the section:
===============================================================
[monthlyreport]
ENVFILE /usr/local/xymon/server/etc/xymonserver.cfg
CMD /usr/local/xymon/server/ext/monthlyreport.sh
CRONDATE 30 4 1 * *
:
:
The CRONDATE keyword is used for tasks that must run at regular intervals or at a specific time. The time specification is identical to the one used by cron in crontab<http://xymon.mrv.de/xymon/help/manpages/man5/crontab.5.html>(5) entries, i.e. a sequence of numbers for minute, hour, day-of-month, month and day-of-week. Three-letter abbreviations in english can be used for the month and day-of-week fields. An asterisk is a wildcard. So in the example above, this job would run once a month, at 4:30 AM on the 1st day of the month.
===============================================================
For my understanding everything I've set up should work, but it doesn't.
Where's my fault? I would really like to fire this check-script from clientlaunch.cfg instead of an crontab entry.
Regards
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
CSC * This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose * CSC Deutschland Services GmbH * Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany * Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt * Registered in Germany: HRB 7574, Wiesbaden
list Japheth Cleaver
This is fixed in trunk and the 4.3.7 branch, but isn't in the tarball. http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6906 http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6899 This specific patch should fix it: http://xymon.svn.sourceforge.net/viewvc/xymon/trunk/common/xymonlaunch.c?r1=6906&r2=6905&view=patch&sortby=rev&sortdir=down&pathrev=6906 -jc
▸
Hello out there,
we are using Xymon 4.3.7 as xymon server. There is a particular client
running Ubuntu 9.04 as operating system and Xymon 4.3.7 as client,
reporting successfully to the Xymon server.
I have been in the need to write a script that is running on a fixed time
of a day. Therefore I configured the script in the clientlaunch.cfg on the
client as follows:
[xymoncheckscript-custom]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/xymoncheckscript-custom.sh
LOGFILE $XYMONCLIENTHOME/logs/ xymoncheckscript-custom.log
CRONDATE 0 11 * * *
When restarting the xymon services on the client I get the following entry
in clientlaunch.log:
2012-06-13 10:58:53 Can't parse cron date: xymoncheckscript-custom->0 11 *
* *
The man page of tasks.cfg has the section:
===============================================================
[monthlyreport]
ENVFILE /usr/local/xymon/server/etc/xymonserver.cfg
CMD /usr/local/xymon/server/ext/monthlyreport.sh
CRONDATE 30 4 1 * *
:
:
The CRONDATE keyword is used for tasks that must run at regular intervals
or at a specific time. The time specification is identical to the one used
by cron in
crontab<http://xymon.mrv.de/xymon/help/manpages/man5/crontab.5.html>;(5)
entries, i.e. a sequence of numbers for minute, hour, day-of-month, month
and day-of-week. Three-letter abbreviations in english can be used for the
month and day-of-week fields. An asterisk is a wildcard. So in the example
above, this job would run once a month, at 4:30 AM on the 1st day of the
month.
===============================================================
For my understanding everything I've set up should work, but it doesn't.
Where's my fault? I would really like to fire this check-script from
clientlaunch.cfg instead of an crontab entry.
Regards
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
CSC * This is a PRIVATE message. If you are not the intended recipient,
please delete without copying and kindly advise us by e-mail of the
mistake in delivery. NOTE: Regardless of content, this e-mail shall not
operate to bind CSC to any order or other contract unless pursuant to
explicit written agreement or government initiative expressly permitting
the use of e-mail for such purpose * CSC Deutschland Services GmbH *
Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany *
Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt *
Registered in Germany: HRB 7574, Wiesbaden
list Becker Christian
Hello, Thank you for this information. Unfortunately I don't know how to apply a patch or to re-compile xymonlaunch - can you point me to the right way to do this? Best regards
▸
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
-----Ursprüngliche Nachricht-----
▸
Von: user-87556346d4af@xymon.invalid [mailto:user-87556346d4af@xymon.invalid] Gesendet: Mittwoch, 13. Juni 2012 19:14 An: Becker Christian Cc: xymon at xymon.com Betreff: Re: [Xymon] clientlaunch.cfg: CRONDATE problem / error? This is fixed in trunk and the 4.3.7 branch, but isn't in the tarball. http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6906 http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6899 This specific patch should fix it: http://xymon.svn.sourceforge.net/viewvc/xymon/trunk/common/xymonlaunch.c?r1=6906&r2=6905&view=patch&sortby=rev&sortdir=down&pathrev=6906 -jc
Hello out there,
we are using Xymon 4.3.7 as xymon server. There is a particular client
running Ubuntu 9.04 as operating system and Xymon 4.3.7 as client,
reporting successfully to the Xymon server.
I have been in the need to write a script that is running on a fixed time
of a day. Therefore I configured the script in the clientlaunch.cfg on the
client as follows:
[xymoncheckscript-custom]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/xymoncheckscript-custom.sh
LOGFILE $XYMONCLIENTHOME/logs/ xymoncheckscript-custom.log
CRONDATE 0 11 * * *
When restarting the xymon services on the client I get the following entry
in clientlaunch.log:
2012-06-13 10:58:53 Can't parse cron date: xymoncheckscript-custom->0 11 *
* *
The man page of tasks.cfg has the section:
===============================================================
[monthlyreport]
ENVFILE /usr/local/xymon/server/etc/xymonserver.cfg
CMD /usr/local/xymon/server/ext/monthlyreport.sh
CRONDATE 30 4 1 * *
:
:
The CRONDATE keyword is used for tasks that must run at regular intervals
or at a specific time. The time specification is identical to the one used
by cron in
crontab<http://xymon.mrv.de/xymon/help/manpages/man5/crontab.5.html>;(5)
entries, i.e. a sequence of numbers for minute, hour, day-of-month, month
and day-of-week. Three-letter abbreviations in english can be used for the
month and day-of-week fields. An asterisk is a wildcard. So in the example
above, this job would run once a month, at 4:30 AM on the 1st day of the
month.
===============================================================
For my understanding everything I've set up should work, but it doesn't.
Where's my fault? I would really like to fire this check-script from
clientlaunch.cfg instead of an crontab entry.
Regards
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
CSC * This is a PRIVATE message. If you are not the intended recipient,
please delete without copying and kindly advise us by e-mail of the
mistake in delivery. NOTE: Regardless of content, this e-mail shall not
operate to bind CSC to any order or other contract unless pursuant to
explicit written agreement or government initiative expressly permitting
the use of e-mail for such purpose * CSC Deutschland Services GmbH *
Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany *
Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt *
Registered in Germany: HRB 7574, Wiesbaden
CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Services GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt • Registered in Germany: HRB 7574, Wiesbaden
list Becker Christian
Hello,
i found an article describing how to patch a source code. I have created a file xymonlaunch.c.patch in the common directory from my xymon install directory. The file contains just this code:
--- trunk/common/xymonlaunch.c 2012/02/02 23:00:35 6905
+++ trunk/common/xymonlaunch.c 2012/02/07 10:19:43 6906
@@ -260,7 +260,8 @@
else if (curtask && (strncasecmp(p, "CRONDATE ", 9) == 0)) {
p+= 9;
xfreedup(curtask->cronstr,p);
- if (curtask->crondate) { crondatefree(curtask->crondate);curtask->crondate=parse_cron_time(curtask->cronstr); }
+ if (curtask->crondate) crondatefree(curtask->crondate);
+ curtask->crondate = parse_cron_time(curtask->cronstr);
if (!curtask->crondate) {
errprintf("Can't parse cron date: %s->%s\n", curtask->key, curtask->cronstr);
curtask->disabled = 1;
Then i did the following (with some errornous results):
[root at xymon common]# patch -p0 <xymonlaunch.c.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|--- trunk/common/xymonlaunch.c 2012/02/02 23:00:35 6905
|+++ trunk/common/xymonlaunch.c 2012/02/07 10:19:43 6906
File to patch: xymonlaunch.c
patching file xymonlaunch.c
Hunk #1 succeeded at 260 with fuzz 2.
[root at xymon common]#
[root at xymon common]#
[root at xymon common]#
[root at xymon common]#
[root at xymon common]# make
cc -c -o xymonlaunch.o xymonlaunch.c
xymonlaunch.c:32:22: error: libxymon.h: No such file or directory
xymonlaunch.c: In function âload_configâ:
xymonlaunch.c:94: error: âstrbuffer_tâ undeclared (first use in this function)
xymonlaunch.c:94: error: (Each undeclared identifier is reported only once
xymonlaunch.c:94: error: for each function it appears in.)
xymonlaunch.c:94: error: âinbufâ undeclared (first use in this function)
xymonlaunch.c:121: warning: assignment makes pointer from integer without a cast
xymonlaunch.c:141: warning: assignment makes pointer from integer without a cast
xymonlaunch.c:186: warning: initialization makes pointer from integer without a cast
xymonlaunch.c:264: warning: assignment makes pointer from integer without a cast
xymonlaunch.c: In function âmainâ:
xymonlaunch.c:500: error: âdebugâ undeclared (first use in this function)
xymonlaunch.c:510: warning: passing argument 1 of âstrdupâ makes pointer from integer without a cast
/usr/include/string.h:175: note: expected âconst char *â but argument is of type âintâ
xymonlaunch.c:514: warning: passing argument 1 of âstrdupâ makes pointer from integer without a cast
/usr/include/string.h:175: note: expected âconst char *â but argument is of type âintâ
xymonlaunch.c:526: warning: passing argument 1 of âstrdupâ makes pointer from integer without a cast
/usr/include/string.h:175: note: expected âconst char *â but argument is of type âintâ
xymonlaunch.c:598: error: âsave_errbufâ undeclared (first use in this function)
xymonlaunch.c:716: warning: assignment makes pointer from integer without a cast
xymonlaunch.c:720: warning: initialization makes pointer from integer without a cast
make: *** [xymonlaunch.o] Error 1
[root at xymon common]#
Did i miss something or did i do something else the wrong way?
▸
Regards
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
-----Ursprüngliche Nachricht-----
▸
Von: Becker Christian Gesendet: Donnerstag, 14. Juni 2012 09:14 An: 'user-87556346d4af@xymon.invalid' Cc: xymon at xymon.com Betreff: AW: [Xymon] clientlaunch.cfg: CRONDATE problem / error? Hello, Thank you for this information. Unfortunately I don't know how to apply a patch or to re-compile xymonlaunch - can you point me to the right way to do this? Best regards Christian CHRISTIAN BECKER System Engineer CSC August-Horch-Strasse 28, 56070 Koblenz, Germany Global Outsourcing Services Central Region | www.csc.com -----Ursprüngliche Nachricht----- Von: user-87556346d4af@xymon.invalid [mailto:user-87556346d4af@xymon.invalid] Gesendet: Mittwoch, 13. Juni 2012 19:14 An: Becker Christian Cc: xymon at xymon.com Betreff: Re: [Xymon] clientlaunch.cfg: CRONDATE problem / error? This is fixed in trunk and the 4.3.7 branch, but isn't in the tarball. http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6906 http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6899 This specific patch should fix it: http://xymon.svn.sourceforge.net/viewvc/xymon/trunk/common/xymonlaunch.c?r1=6906&r2=6905&view=patch&sortby=rev&sortdir=down&pathrev=6906 -jc
Hello out there,
we are using Xymon 4.3.7 as xymon server. There is a particular client
running Ubuntu 9.04 as operating system and Xymon 4.3.7 as client,
reporting successfully to the Xymon server.
I have been in the need to write a script that is running on a fixed time
of a day. Therefore I configured the script in the clientlaunch.cfg on the
client as follows:
[xymoncheckscript-custom]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/xymoncheckscript-custom.sh
LOGFILE $XYMONCLIENTHOME/logs/ xymoncheckscript-custom.log
CRONDATE 0 11 * * *
When restarting the xymon services on the client I get the following entry
in clientlaunch.log:
2012-06-13 10:58:53 Can't parse cron date: xymoncheckscript-custom->0 11 *
* *
The man page of tasks.cfg has the section:
===============================================================
[monthlyreport]
ENVFILE /usr/local/xymon/server/etc/xymonserver.cfg
CMD /usr/local/xymon/server/ext/monthlyreport.sh
CRONDATE 30 4 1 * *
:
:
The CRONDATE keyword is used for tasks that must run at regular intervals
or at a specific time. The time specification is identical to the one used
by cron in
crontab<http://xymon.mrv.de/xymon/help/manpages/man5/crontab.5.html>;(5)
entries, i.e. a sequence of numbers for minute, hour, day-of-month, month
and day-of-week. Three-letter abbreviations in english can be used for the
month and day-of-week fields. An asterisk is a wildcard. So in the example
above, this job would run once a month, at 4:30 AM on the 1st day of the
month.
===============================================================
For my understanding everything I've set up should work, but it doesn't.
Where's my fault? I would really like to fire this check-script from
clientlaunch.cfg instead of an crontab entry.
Regards
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
CSC * This is a PRIVATE message. If you are not the intended recipient,
please delete without copying and kindly advise us by e-mail of the
mistake in delivery. NOTE: Regardless of content, this e-mail shall not
operate to bind CSC to any order or other contract unless pursuant to
explicit written agreement or government initiative expressly permitting
the use of e-mail for such purpose * CSC Deutschland Services GmbH *
Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany *
Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt *
Registered in Germany: HRB 7574, Wiesbaden
CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Services GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt • Registered in Germany: HRB 7574, Wiesbaden
list Becker Christian
Hello, any advise on this compile / patch issue (see my previous posting below...) ? Regards
▸
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
-----Ursprüngliche Nachricht-----
▸
Von: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] Im Auftrag von Becker Christian Gesendet: Freitag, 15. Juni 2012 11:19 An: user-87556346d4af@xymon.invalid Cc: xymon at xymon.com Betreff: [Xymon] WG: clientlaunch.cfg: CRONDATE problem / error? Hello, i found an article describing how to patch a source code. I have created a file xymonlaunch.c.patch in the common directory from my xymon install directory. The file contains just this code: --- trunk/common/xymonlaunch.c 2012/02/02 23:00:35 6905 +++ trunk/common/xymonlaunch.c 2012/02/07 10:19:43 6906 @@ -260,7 +260,8 @@ else if (curtask && (strncasecmp(p, "CRONDATE ", 9) == 0)) { p+= 9; xfreedup(curtask->cronstr,p); - if (curtask->crondate) { crondatefree(curtask->crondate);curtask->crondate=parse_cron_time(curtask->cronstr); } + if (curtask->crondate) crondatefree(curtask->crondate); + curtask->crondate = parse_cron_time(curtask->cronstr); if (!curtask->crondate) { errprintf("Can't parse cron date: %s->%s\n", curtask->key, curtask->cronstr); curtask->disabled = 1; Then i did the following (with some errornous results): [root at xymon common]# patch -p0 <xymonlaunch.c.patch can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: |--- trunk/common/xymonlaunch.c 2012/02/02 23:00:35 6905 |+++ trunk/common/xymonlaunch.c 2012/02/07 10:19:43 6906 File to patch: xymonlaunch.c patching file xymonlaunch.c Hunk #1 succeeded at 260 with fuzz 2. [root at xymon common]# [root at xymon common]# [root at xymon common]# [root at xymon common]# [root at xymon common]# make cc -c -o xymonlaunch.o xymonlaunch.c xymonlaunch.c:32:22: error: libxymon.h: No such file or directory xymonlaunch.c: In function âload_configâ: xymonlaunch.c:94: error: âstrbuffer_tâ undeclared (first use in this function) xymonlaunch.c:94: error: (Each undeclared identifier is reported only once xymonlaunch.c:94: error: for each function it appears in.) xymonlaunch.c:94: error: âinbufâ undeclared (first use in this function) xymonlaunch.c:121: warning: assignment makes pointer from integer without a cast xymonlaunch.c:141: warning: assignment makes pointer from integer without a cast xymonlaunch.c:186: warning: initialization makes pointer from integer without a cast xymonlaunch.c:264: warning: assignment makes pointer from integer without a cast xymonlaunch.c: In function âmainâ: xymonlaunch.c:500: error: âdebugâ undeclared (first use in this function) xymonlaunch.c:510: warning: passing argument 1 of âstrdupâ makes pointer from integer without a cast /usr/include/string.h:175: note: expected âconst char *â but argument is of type âintâ xymonlaunch.c:514: warning: passing argument 1 of âstrdupâ makes pointer from integer without a cast /usr/include/string.h:175: note: expected âconst char *â but argument is of type âintâ xymonlaunch.c:526: warning: passing argument 1 of âstrdupâ makes pointer from integer without a cast /usr/include/string.h:175: note: expected âconst char *â but argument is of type âintâ xymonlaunch.c:598: error: âsave_errbufâ undeclared (first use in this function) xymonlaunch.c:716: warning: assignment makes pointer from integer without a cast xymonlaunch.c:720: warning: initialization makes pointer from integer without a cast make: *** [xymonlaunch.o] Error 1 [root at xymon common]# Did i miss something or did i do something else the wrong way? Regards Christian CHRISTIAN BECKER System Engineer CSC August-Horch-Strasse 28, 56070 Koblenz, Germany Global Outsourcing Services Central Region | www.csc.com -----Ursprüngliche Nachricht----- Von: Becker Christian Gesendet: Donnerstag, 14. Juni 2012 09:14 An: 'user-87556346d4af@xymon.invalid' Cc: xymon at xymon.com Betreff: AW: [Xymon] clientlaunch.cfg: CRONDATE problem / error? Hello, Thank you for this information. Unfortunately I don't know how to apply a patch or to re-compile xymonlaunch - can you point me to the right way to do this? Best regards Christian CHRISTIAN BECKER System Engineer CSC August-Horch-Strasse 28, 56070 Koblenz, Germany Global Outsourcing Services Central Region | www.csc.com -----Ursprüngliche Nachricht----- Von: user-87556346d4af@xymon.invalid [mailto:user-87556346d4af@xymon.invalid] Gesendet: Mittwoch, 13. Juni 2012 19:14 An: Becker Christian Cc: xymon at xymon.com Betreff: Re: [Xymon] clientlaunch.cfg: CRONDATE problem / error? This is fixed in trunk and the 4.3.7 branch, but isn't in the tarball. http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6906 http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6899 This specific patch should fix it: http://xymon.svn.sourceforge.net/viewvc/xymon/trunk/common/xymonlaunch.c?r1=6906&r2=6905&view=patch&sortby=rev&sortdir=down&pathrev=6906 -jc
Hello out there,
we are using Xymon 4.3.7 as xymon server. There is a particular client
running Ubuntu 9.04 as operating system and Xymon 4.3.7 as client,
reporting successfully to the Xymon server.
I have been in the need to write a script that is running on a fixed time
of a day. Therefore I configured the script in the clientlaunch.cfg on the
client as follows:
[xymoncheckscript-custom]
ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg
CMD $XYMONCLIENTHOME/ext/xymoncheckscript-custom.sh
LOGFILE $XYMONCLIENTHOME/logs/ xymoncheckscript-custom.log
CRONDATE 0 11 * * *
When restarting the xymon services on the client I get the following entry
in clientlaunch.log:
2012-06-13 10:58:53 Can't parse cron date: xymoncheckscript-custom->0 11 *
* *
The man page of tasks.cfg has the section:
===============================================================
[monthlyreport]
ENVFILE /usr/local/xymon/server/etc/xymonserver.cfg
CMD /usr/local/xymon/server/ext/monthlyreport.sh
CRONDATE 30 4 1 * *
:
:
The CRONDATE keyword is used for tasks that must run at regular intervals
or at a specific time. The time specification is identical to the one used
by cron in
crontab<http://xymon.mrv.de/xymon/help/manpages/man5/crontab.5.html>;(5)
entries, i.e. a sequence of numbers for minute, hour, day-of-month, month
and day-of-week. Three-letter abbreviations in english can be used for the
month and day-of-week fields. An asterisk is a wildcard. So in the example
above, this job would run once a month, at 4:30 AM on the 1st day of the
month.
===============================================================
For my understanding everything I've set up should work, but it doesn't.
Where's my fault? I would really like to fire this check-script from
clientlaunch.cfg instead of an crontab entry.
Regards
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
CSC * This is a PRIVATE message. If you are not the intended recipient,
please delete without copying and kindly advise us by e-mail of the
mistake in delivery. NOTE: Regardless of content, this e-mail shall not
operate to bind CSC to any order or other contract unless pursuant to
explicit written agreement or government initiative expressly permitting
the use of e-mail for such purpose * CSC Deutschland Services GmbH *
Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany *
Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt *
Registered in Germany: HRB 7574, Wiesbaden
CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Services GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt • Registered in Germany: HRB 7574, Wiesbaden CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Services GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt • Registered in Germany: HRB 7574, Wiesbaden CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Deutschland Services GmbH • Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany • Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt • Registered in Germany: HRB 7574, Wiesbaden
list Betsy Schwartz
I think it would help if you just did a fresh attempt to patch and make and posted the output. I'm finding this hard to read because I see "can't find file to patch" followed by a make. You need to be in the source code directory that has a subdirectory trunk containing common/xymonlaunch.c (or edit that path to reflect what you actually have checked out ) Then when attempting to make you need to have libxymon.h in your library path I'm thinking that the last time I built from source I didn't have "trunk" in my path because I only downloaded the *contents* of the trunk directory, so you might have to tweak the patch to reflect this. (If you're not familiar with SVN the repository layout may be confusing. Take a look at http://svnbook.red-bean.com/en/1.7/svn.branchmerge.maint.html#svn.branchmerge.maint.layout )
list Japheth Cleaver
Hi. Sorry, I missed this one earlier. [root at xymon common]# patch -p0 <xymonlaunch.c.patch [root at xymon common]# make The patch went okay (although -p3?), but you're running "make" from the common directory instead of the main directory. "cd .." to the main xymon directory and re-run "make" from there and it should rebuild fine. HTH, -jc
▸
Hello, any advise on this compile / patch issue (see my previous posting below...) ? Regards CHRISTIAN BECKER System Engineer CSC August-Horch-Strasse 28, 56070 Koblenz, Germany Global Outsourcing Services Central Region | www.csc.com
-----Ursprüngliche Nachricht-----
▸
Von: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] Im Auftrag
von Becker Christian
Gesendet: Freitag, 15. Juni 2012 11:19
An: user-87556346d4af@xymon.invalid
Cc: xymon at xymon.com
Betreff: [Xymon] WG: clientlaunch.cfg: CRONDATE problem / error?
Hello,
i found an article describing how to patch a source code. I have created a
file xymonlaunch.c.patch in the common directory from my xymon install
directory. The file contains just this code:
--- trunk/common/xymonlaunch.c 2012/02/02 23:00:35 6905
+++ trunk/common/xymonlaunch.c 2012/02/07 10:19:43 6906
@@ -260,7 +260,8 @@
else if (curtask && (strncasecmp(p, "CRONDATE ", 9) == 0))
{
p+= 9;
xfreedup(curtask->cronstr,p);
- if (curtask->crondate) {
crondatefree(curtask->crondate);curtask->crondate=parse_cron_time(curtask->cronstr);
}
+ if (curtask->crondate)
crondatefree(curtask->crondate);
+ curtask->crondate =
parse_cron_time(curtask->cronstr);
if (!curtask->crondate) {
errprintf("Can't parse cron date:
%s->%s\n", curtask->key,
curtask->cronstr);
curtask->disabled = 1;
Then i did the following (with some errornous results):
[root at xymon common]# patch -p0 <xymonlaunch.c.patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|--- trunk/common/xymonlaunch.c 2012/02/02 23:00:35 6905
|+++ trunk/common/xymonlaunch.c 2012/02/07 10:19:43 6906
File to patch: xymonlaunch.c
patching file xymonlaunch.c
Hunk #1 succeeded at 260 with fuzz 2.
[root at xymon common]#
[root at xymon common]#
[root at xymon common]#
[root at xymon common]#
[root at xymon common]# make
cc -c -o xymonlaunch.o xymonlaunch.c
xymonlaunch.c:32:22: error: libxymon.h: No such file or directory
xymonlaunch.c: In function âload_configâ:
xymonlaunch.c:94: error: âstrbuffer_tâ undeclared (first use in this
▸
function)
xymonlaunch.c:94: error: (Each undeclared identifier is reported only
once
xymonlaunch.c:94: error: for each function it appears in.)
xymonlaunch.c:94: error: âinbufâ undeclared (first use in this
▸
function)
xymonlaunch.c:121: warning: assignment makes pointer from integer without
a cast
xymonlaunch.c:141: warning: assignment makes pointer from integer without
a cast
xymonlaunch.c:186: warning: initialization makes pointer from integer
without a cast
xymonlaunch.c:264: warning: assignment makes pointer from integer without
a cast
xymonlaunch.c: In function âmainâ:
xymonlaunch.c:500: error: âdebugâ undeclared (first use in this
function)
xymonlaunch.c:510: warning: passing argument 1 of âstrdupâ makes pointer
from integer without a cast
/usr/include/string.h:175: note: expected âconst char *â but argument is
of type âintâ
xymonlaunch.c:514: warning: passing argument 1 of âstrdupâ makes pointer
from integer without a cast
/usr/include/string.h:175: note: expected âconst char *â but argument is
of type âintâ
xymonlaunch.c:526: warning: passing argument 1 of âstrdupâ makes pointer
from integer without a cast
/usr/include/string.h:175: note: expected âconst char *â but argument is
of type âintâ
xymonlaunch.c:598: error: âsave_errbufâ undeclared (first use in this
▸
function)
xymonlaunch.c:716: warning: assignment makes pointer from integer without
a cast
xymonlaunch.c:720: warning: initialization makes pointer from integer
without a cast
make: *** [xymonlaunch.o] Error 1
[root at xymon common]#
Did i miss something or did i do something else the wrong way?
Regards
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
-----Ursprüngliche Nachricht-----
▸
Von: Becker Christian
Gesendet: Donnerstag, 14. Juni 2012 09:14
An: 'user-87556346d4af@xymon.invalid'
Cc: xymon at xymon.com
Betreff: AW: [Xymon] clientlaunch.cfg: CRONDATE problem / error?
Hello,
Thank you for this information.
Unfortunately I don't know how to apply a patch or to re-compile
xymonlaunch - can you point me to the right way to do this?
Best regards
Christian
CHRISTIAN BECKER
System Engineer
CSC
August-Horch-Strasse 28, 56070 Koblenz, Germany
Global Outsourcing Services Central Region | www.csc.com
-----Ursprüngliche Nachricht-----
▸
Von: user-87556346d4af@xymon.invalid [mailto:user-87556346d4af@xymon.invalid] Gesendet: Mittwoch, 13. Juni 2012 19:14 An: Becker Christian Cc: xymon at xymon.com Betreff: Re: [Xymon] clientlaunch.cfg: CRONDATE problem / error? This is fixed in trunk and the 4.3.7 branch, but isn't in the tarball. http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6906 http://xymon.svn.sourceforge.net/viewvc/xymon?view=revision&revision=6899 This specific patch should fix it: http://xymon.svn.sourceforge.net/viewvc/xymon/trunk/common/xymonlaunch.c?r1=6906&r2=6905&view=patch&sortby=rev&sortdir=down&pathrev=6906 -jcHello out there, we are using Xymon 4.3.7 as xymon server. There is a particular client running Ubuntu 9.04 as operating system and Xymon 4.3.7 as client, reporting successfully to the Xymon server. I have been in the need to write a script that is running on a fixed time of a day. Therefore I configured the script in the clientlaunch.cfg on the client as follows: [xymoncheckscript-custom] ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg CMD $XYMONCLIENTHOME/ext/xymoncheckscript-custom.sh LOGFILE $XYMONCLIENTHOME/logs/ xymoncheckscript-custom.log CRONDATE 0 11 * * * When restarting the xymon services on the client I get the following entry in clientlaunch.log: 2012-06-13 10:58:53 Can't parse cron date: xymoncheckscript-custom->0 11 • * * The man page of tasks.cfg has the section: =============================================================== [monthlyreport] ENVFILE /usr/local/xymon/server/etc/xymonserver.cfg CMD /usr/local/xymon/server/ext/monthlyreport.sh CRONDATE 30 4 1 * * : : The CRONDATE keyword is used for tasks that must run at regular intervals or at a specific time. The time specification is identical to the one used by cron in crontab<http://xymon.mrv.de/xymon/help/manpages/man5/crontab.5.html>;(5) entries, i.e. a sequence of numbers for minute, hour, day-of-month, month and day-of-week. Three-letter abbreviations in english can be used for the month and day-of-week fields. An asterisk is a wildcard. So in the example above, this job would run once a month, at 4:30 AM on the 1st day of the month. =============================================================== For my understanding everything I've set up should work, but it doesn't. Where's my fault? I would really like to fire this check-script from clientlaunch.cfg instead of an crontab entry. Regards Christian CHRISTIAN BECKER System Engineer CSC August-Horch-Strasse 28, 56070 Koblenz, Germany Global Outsourcing Services Central Region | www.csc.com CSC * This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose * CSC Deutschland Services GmbH * Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany * Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt • Registered in Germany: HRB 7574, Wiesbaden
CSC ⢠This is a PRIVATE message. If you are not the intended recipient,
▸
please delete without copying and kindly advise us by e-mail of the
mistake in delivery. NOTE: Regardless of content, this e-mail shall not
operate to bind CSC to any order or other contract unless pursuant to
explicit written agreement or government initiative expressly permitting
the use of e-mail for such purpose ⢠CSC Deutschland Services GmbH â¢
Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany â¢
Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt
⢠Registered in Germany: HRB 7574, Wiesbaden
CSC ⢠This is a PRIVATE message. If you are not the intended recipient,
▸
please delete without copying and kindly advise us by e-mail of the
mistake in delivery. NOTE: Regardless of content, this e-mail shall not
operate to bind CSC to any order or other contract unless pursuant to
explicit written agreement or government initiative expressly permitting
the use of e-mail for such purpose ⢠CSC Deutschland Services GmbH â¢
Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany â¢
Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt
⢠Registered in Germany: HRB 7574, Wiesbaden
CSC ⢠This is a PRIVATE message. If you are not the intended recipient,
▸
please delete without copying and kindly advise us by e-mail of the
mistake in delivery. NOTE: Regardless of content, this e-mail shall not
operate to bind CSC to any order or other contract unless pursuant to
explicit written agreement or government initiative expressly permitting
the use of e-mail for such purpose ⢠CSC Deutschland Services GmbH â¢
Registered Office: Abraham-Lincoln-Park 1, 65189 Wiesbaden, Germany â¢
Board of Directors: Gerhard Fercho (Chairman),Thomas Nebe, Peter Schmidt
⢠Registered in Germany: HRB 7574, Wiesbaden