Xymon Mailing List Archive search

Running the Availability Report from a crontab entry

5 messages in this thread

list Bruce White · Tue, 17 Jan 2012 14:13:29 -0600 ·
Hi all,

I know I have seen some discussion on how to do this, but my searching
the archive has come up with nothing.   Can anyone provide an example of
how I would run the Availability report from a crontab entry, so I could
produce a report automatically the first of every month for the last
month?

Thanks,
Bruce


 
 Bruce White
 Senior Enterprise Systems Engineer | Phone: X-XXX-XXX-XXXX | Fax: XXX-XXX-XXXX | user-58f975e8bf9d@xymon.invalid | http://www.fellowes.com/
 
 
 
Disclaimer: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Fellowes, Inc.
list Japheth Cleaver · Tue, 17 Jan 2012 13:38:26 -0800 (PST) ·
quoted from Bruce White
On Tue, January 17, 2012 12:13 pm, White, Bruce wrote:
Hi all,

I know I have seen some discussion on how to do this, but my searching
the archive has come up with nothing.   Can anyone provide an example of
how I would run the Availability report from a crontab entry, so I could
produce a report automatically the first of every month for the last
month?
From xymonreport.sh:
"10 2 1 * * /usr/bin/xymoncmd --env=/etc/xymon/xymonserver.cfg
xymonreports.sh monthly"

..should be all you need (adjust your paths as needed). If you want to be
slick, drop versions of this into cron.daily/weekly/monthly instead.

Reports will be dropped into your webroot under /periodic.


HTH,

-jc


This is what I do in my RPM (with paths):

## Install cron jobs for the xymonreports.sh script on the server
  echo "#!/bin/sh
# Run daily xymon reports

  exec $XYMONHOME/bin/xymoncmd $XYMONHOME/bin/xymonreports.sh daily" >
/etc/cron.daily/xymonreports

  sed -e 's/daily/weekly/' /etc/cron.daily/xymonreports >
/etc/cron.weekly/xymonreports
  sed -e 's/daily/monthly/' /etc/cron.daily/xymonreports >
/etc/cron.monthly/xymonreports
  chmod 755 /etc/cron.*/xymonreports

## Create destination directory
  install -d /var/www/xymon/periodic
list Buchan Milne · Wed, 18 Jan 2012 07:55:04 +0200 ·
quoted from Japheth Cleaver
On Tuesday, 17 January 2012 23:38:26 user-87556346d4af@xymon.invalid wrote:
On Tue, January 17, 2012 12:13 pm, White, Bruce wrote:
Hi all,
I know I have seen some discussion on how to do this, but my searching
the archive has come up with nothing.   Can anyone provide an example of
how I would run the Availability report from a crontab entry, so I could
produce a report automatically the first of every month for the last
month?
From xymonreport.sh:
"10 2 1 * * /usr/bin/xymoncmd --env=/etc/xymon/xymonserver.cfg
xymonreports.sh monthly"
Where is xymonreports.sh?

(yes, I happen to need to implement something like this this week ....)
quoted from Japheth Cleaver
..should be all you need (adjust your paths as needed). If you want to be
slick, drop versions of this into cron.daily/weekly/monthly instead.

Reports will be dropped into your webroot under /periodic.


HTH,

-jc


This is what I do in my RPM (with paths):
IMHO, this should be a separate package, and/or extension, and we should try and sort out/standardise extension deployment/packaging etc.

Regards,
Buchan
list Japheth Cleaver · Tue, 17 Jan 2012 22:12:09 -0800 (PST) ·
quoted from Buchan Milne
On Tue, January 17, 2012 9:55 pm, Buchan Milne wrote:
On Tuesday, 17 January 2012 23:38:26 user-87556346d4af@xymon.invalid wrote:
On Tue, January 17, 2012 12:13 pm, White, Bruce wrote:
Hi all,

I know I have seen some discussion on how to do this, but my searching
the archive has come up with nothing.   Can anyone provide an example
of
how I would run the Availability report from a crontab entry, so I
could
produce a report automatically the first of every month for the last
month?
From xymonreport.sh:
"10 2 1 * * /usr/bin/xymoncmd --env=/etc/xymon/xymonserver.cfg
xymonreports.sh monthly"
Where is xymonreports.sh?

(yes, I happen to need to implement something like this this week ....)

In the tarball...
./xymond/xymonreports.sh.DIST -> ./xymond/xymonreports.sh
quoted from Buchan Milne

This is what I do in my RPM (with paths):
IMHO, this should be a separate package, and/or extension, and we should
try
and sort out/standardise extension deployment/packaging etc.
Well, agreed... ;) But this, being in the distribution, seems like
something best kept close to the original. Arguably tasks.cfg (or .d) is
the proper location, now that we have CRONDATE as an option, whether
disabled by default or not.


-jc
list Buchan Milne · Wed, 18 Jan 2012 08:26:41 +0200 ·
quoted from Buchan Milne
On Wednesday, 18 January 2012 07:55:04 Buchan Milne wrote:
On Tuesday, 17 January 2012 23:38:26 user-87556346d4af@xymon.invalid wrote:
On Tue, January 17, 2012 12:13 pm, White, Bruce wrote:
Hi all,

I know I have seen some discussion on how to do this, but my searching
the archive has come up with nothing.   Can anyone provide an example
of how I would run the Availability report from a crontab entry, so I
could produce a report automatically the first of every month for the
last month?
From xymonreport.sh:
"10 2 1 * * /usr/bin/xymoncmd --env=/etc/xymon/xymonserver.cfg
xymonreports.sh monthly"
Where is xymonreports.sh?
Ah, shipped in 4.3.x, but it doesn't really suit my needs ...

Regards,
Buchan