Re: [Tutor] datetime substraction

2014-08-27 Thread Anirudh Tamsekar
Hi Alan/Danny/Steve, Thank you very much, I'm able to get the script working. -Regards, Anirudh Tamsekar On Tue, Aug 26, 2014 at 10:25 PM, Alan Gauld wrote: > On 26/08/14 10:10, Anirudh Tamsekar wrote: > > *Traceback (most recent call last):* >> * File "./rsyslog_check.py", line 22, in * >

Re: [Tutor] datetime substraction

2014-08-26 Thread Danny Yoo
> > I have written a script, however I'm not able to get the date substraction > math right, getting the following error > (Searched google and other resources too). > > Traceback (most recent call last): > File "./rsyslog_check.py", line 22, in > difft=cur_time-mt > TypeError: unsupported o

Re: [Tutor] datetime substraction

2014-08-26 Thread Alan Gauld
On 26/08/14 10:10, Anirudh Tamsekar wrote: *Traceback (most recent call last):* * File "./rsyslog_check.py", line 22, in * *difft=cur_time-mt* *TypeError: unsupported operand type(s) for -: 'str' and 'str'* Request your help. Also point any good documentation where I can get quick referenc

Re: [Tutor] datetime substraction

2014-08-26 Thread Steven D'Aprano
On Tue, Aug 26, 2014 at 02:40:30PM +0530, Anirudh Tamsekar wrote: > I have written a script, however I'm not able to get the date substraction > math right, getting the following error > (Searched google and other resources too). > > *Traceback (most recent call last):* > * File "./rsyslog_check

[Tutor] datetime substraction

2014-08-26 Thread Anirudh Tamsekar
Hi, I'm writing a script to monitor rsyslog (second level check). Overview: We have Monit for monitoring rsyslog, however we need a script to do a second level checks. I'm looking for a script which will check if rsyslog is being updated, also log rotation is happening. Incase of the new file c