Cron Confusion.. Continued... *ugh*

jeff.howard at centrelink.gov.au jeff.howard at centrelink.gov.au
Wed Sep 7 01:38:40 EDT 2005


Hi All,

I did some digging in version 3.2 on this issue and ended up using the 
system "cron" utility to call a script which makes use of "argusctl" to do 
the override thing.

>From memory, there was something to do with the use of "0" in the time 
spec. - notice Scott's timespec. doesn't have any zeros in it. From 
memory,  the 0 was handled the same as no value (undef) in the logic of 
one of the sub-routines in Cron.pm. The result was that the job was 
executed once, but when the code tried to reschedule it silently failed.

With my external "cron" script being stable, I haven't needed to look at 
3.3 with respect to this problem. 

Prehaps, if you use "59 3 * * *" as your timespec you'll get pretty much 
what you want? With the 6 fields in the example, and the run-once 
behaviour of the internal cron facility, I have just stuck with the 
external script. The following doesn't address your problem directly but 
might be of interest:

The script I use does some of the expected minimal input checking and then 
invokes the following

 argusctl override \
        object=$object \
        user="*external cronjob*" \
        text="expected nightly maintenance downtime" \
        mode=manual \
        expires=$relexpires

where "$object" is a given object name in the "Top:..." format and 
"$relexpires" is the calculated "epoch" value for when the override should 
expire.

The following is what I get in the argus log for an override of 13 hours 
from 6pm using the script snippet shown above on a argus-3.2 system:

Wed 7 Sep 07:00:06 2005 override    OVERRIDE - removed by system
Wed 7 Sep 07:00:06 2005 override    OVERRIDE - expired
Tue 6 Sep 23:47:37 2005 override    TRANSITION - override
Tue 6 Sep 18:00:04 2005 up                OVERRIDE - enabled by *external 
cronjob*
Tue 6 Sep 18:00:04 2005 up                OVERRIDE - expected nightly 
maintenance downtime

Hope this helps.

---
Cheers, Jeff




"Scott Hiemstra" <scott at hiemstra.us>
Sent by: arguslist-bounces at tcp4me.com
07/09/2005 01:11 PM
Please respond to Discussion about Argus
 
        To:     "'Discussion about Argus'" <arguslist at tcp4me.com>
        cc: 
        Subject:        RE: Cron Confusion.. Continued...  *ugh*
 Reference:   
  Expires on 







Jason,

I use the cron directive for nightly maintenance and it seems to work 
fine,
I get my nightly overrides and I don't get paged so I consider it success. 
 

Here is the config I use regarding cron:

Host "webserver" {
   hostname:   webserver.domainname.com
   graph:      yes
   Service Ping {
   cron "59 12 * * *" {
       func:       override
       expires:    600
       mode:       manual
       text:       nightly maintenance
   }
}

Scott

> -----Original Message-----
> From: arguslist-bounces at tcp4me.com [mailto:arguslist-bounces at tcp4me.com]
> On Behalf Of Jason 'XenoPhage' Frisvold
> Sent: Tuesday, September 06, 2005 10:59 PM
> To: Discussion about Argus
> Subject: Re: Cron Confusion.. Continued... *ugh*
> 
> Hi all,
> 
> I haven't seen a response to the below message, so I'm re-posting it.
> Does anyone know the answer to this?  Is anyone using the cron feature?
> 
> Thanks!
> 
> Jason 'XenoPhage' Frisvold wrote:
> 
> >*Help!*
> >
> >I'm apparently missing something, or doing something wrong, or maybe
> >even completely misunderstanding this feature..  The goal is to
> >automatically override at 4 am, for an hour.  The example on the
> >documentation page of the site actually has 6 fields in the cron
> >command, but I was told previously that that was incorrect...
> >
> >I'm running Argus dev-20050720
> >
> >So, here's a snippet of my config.  Can someone please tell me what I'm
> >doing wrong??
> >
> >         Service SYS/disk {
> >            uname: usr2
> >            label: usr2
> >            arg: /usr2
> >            graph: yes
> >            maxvalue: 5
> >            cron "0 4 * * *" {
> >               func: override
> >               text: Backup In Progress
> >               expires: 3600
> >               mode: manual
> >            }
> >         }
> >
> >This is from the log last night :
> >
> >Wed 31 Aug 04:49:27 2005              up              TRANSITION - up
> >Wed 31 Aug 04:24:27 2005              down            TRANSITION - down
> >
> >
> >It *did* work..  once...  :
> >
> >Wed 24 Aug 05:00:49 2005              up              OVERRIDE - 
removed by system
> >Wed 24 Aug 05:00:49 2005              up              OVERRIDE - 
expired
> >Wed 24 Aug 04:44:27 2005              up              TRANSITION - up
> >Wed 24 Aug 04:00:49 2005              down            OVERRIDE - 
enabled by *internal-
> cronjob*
> >Wed 24 Aug 04:00:49 2005              down            OVERRIDE - Backup 
In Progress
> >
> >
> >
> >
> 
> 
> --
> ---------------------------
> Jason 'XenoPhage' Frisvold
> Engine / Technology Programmer
> friz at godshell.com
> RedHat Certified - RHCE # 803004140609871
> MySQL Pro Certified - ID# 207171862
> MySQL Core Certified - ID# 205982910
> ---------------------------
> "Something mysterious is formed, born in the silent void. Waiting alone
> and unmoving, it is at once still and yet in constant motion. It is the
> source of all programs. I do not know its name, so I will call it the 
Tao
> of Programming."
> 
> _______________________________________________
> http://argus.tcp4me.com/
> Arguslist at tcp4me.com
> http://www.tcp4me.com/mailman/listinfo/arguslist

_______________________________________________
http://argus.tcp4me.com/
Arguslist at tcp4me.com
http://www.tcp4me.com/mailman/listinfo/arguslist




**********************************************************************
IMPORTANT:  This e-mail is intended for the use of the addressee and may contain information that is confidential, commercially valuable or subject to legal or parliamentary privilege.  If you are not the intended recipient you are notified that any review, re-transmission, disclosure, use or dissemination of this communication is strictly prohibited by several Commonwealth Acts of Parliament.  If you have received this communication in error please notify the sender immediately and delete all copies of this transmission together with any attachments.
**********************************************************************



More information about the Arguslist mailing list