Xymon Mailing List Archive search

apt plugin from debians hobbit-plugins package

11 messages in this thread

list Wouter Schoot · Thu, 30 Apr 2009 15:20:10 +0200 ·
Hey all,

The apt plugin, which checks if apt-get update is run regularly, doesn't seem to work since I've upgraded to Debian Lenny. The file /var/lib/apt/lists/lock doesn't get updated anymore and that's one of the three files it checks for the timestamp. after 1.5 days, it turns yellow, no matter how often I run apt-get update. Anyone with that same experience? I have this on multiple machines.

Wouter
list Jason Hand · Thu, 30 Apr 2009 10:31:54 -0400 ·
Yes, I see that on Ubuntu as well which is Debian derivative.

Sincerely,
Jason
quoted from Wouter Schoot


On Apr 30, 2009, at 9:20 AM, Wouter Schoot wrote:
Hey all,

The apt plugin, which checks if apt-get update is run regularly,  doesn't seem to work since I've upgraded to Debian Lenny. The file / var/lib/apt/lists/lock doesn't get updated anymore and that's one of  the three files it checks for the timestamp. after 1.5 days, it  turns yellow, no matter how often I run apt-get update. Anyone with  that same experience? I have this on multiple machines.

Wouter

list Malcolm Hunter · Thu, 30 Apr 2009 16:44:06 +0200 ·
Yes, I see that on Ubuntu as well which is Debian derivative.
I'd suggest raising a bug report with the Debian package maintainer.

Malcolm


-- 
Technical copy-editor & proofreader

KDE Proofreading Team
KDE British English Translation Team

http://l10n.kde.org/team-infos.php?teamcode=en_GB

Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01
list dOCtoR MADneSs · Thu, 30 Apr 2009 17:55:21 +0200 ·
quoted from Malcolm HunterMalcolm Hunter a écrit :
Yes, I see that on Ubuntu as well which is Debian derivative.

    

I'd suggest raising a bug report with the Debian package maintainer.



Malcolm





  
Hi,

On my side I just changed my crontab :

apt-get update && touch /var/lib/apt/lists/lock

so if the update is succesfull, the mtime of /var/lib/apt/lists/lock is changed, and the apt plugin reports green.
list Wouter Schoot · Thu, 30 Apr 2009 21:38:57 +0200 ·
quoted from dOCtoR MADneSs
dOCtoR MADneSs wrote:
On my side I just changed my crontab :
apt-get update && touch /var/lib/apt/lists/lock
Sounds good enough for now, I've changed that in the cron-apt file in 
cron.d and will see if it works.

Wouter
list Christoph Berg · Mon, 4 May 2009 12:49:26 +0200 ·
Re: dOCtoR MADneSs 2009-04-30 <user-7298952df550@xymon.invalid>
quoted from dOCtoR MADneSs
On my side I just changed my crontab :

apt-get update && touch /var/lib/apt/lists/lock

so if the update is succesfull, the mtime of /var/lib/apt/lists/lock is
changed, and the apt plugin reports green.
Ah, looks like using a lock file doesn't update the mtime. I didn't
notice until now as I'm using the "all-included" hack suggested in
apt.pl:

44 */4	* * *	root  ! apt-get -qq update 2>&1 | grep -q . && date -u > /var/lib/apt/update_success

Unfortunately apt-get update even returns 0 in case of some errors
(iirc unknown apt-keys etc.), so this command checks for an empty
output of apt-get -qq update instead.

(http://bugs.debian.org/526894)

Christoph
-- 
user-92157dbc91bf@xymon.invalid | http://www.df7cb.de/
list Rasmus Simon-Riegel · Tue, 05 May 2009 09:10:25 +0200 ·
i made a little change in /usr/lib/hobbit/client/ext/apt

in @stamp_files add "/var/lib/apticron/last_run" and remove "/var/lib/apt/lists/lock".

before:
my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apt/lists/lock);
after:
my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apticron/last_run);

works fine in lenny

Rasmus
quoted from Christoph Berg

Christoph Berg schrieb:
Re: dOCtoR MADneSs 2009-04-30 <user-7298952df550@xymon.invalid>
On my side I just changed my crontab :

apt-get update && touch /var/lib/apt/lists/lock

so if the update is succesfull, the mtime of /var/lib/apt/lists/lock is
changed, and the apt plugin reports green.
Ah, looks like using a lock file doesn't update the mtime. I didn't
notice until now as I'm using the "all-included" hack suggested in
apt.pl:

44 */4	* * *	root  ! apt-get -qq update 2>&1 | grep -q . && date -u > /var/lib/apt/update_success

Unfortunately apt-get update even returns 0 in case of some errors
(iirc unknown apt-keys etc.), so this command checks for an empty
output of apt-get -qq update instead.

(http://bugs.debian.org/526894)

Christoph
list Wouter Schoot · Tue, 05 May 2009 09:19:52 +0200 ·
quoted from Rasmus Simon-Riegel
Rasmus Simon-Riegel wrote:
i made a little change in /usr/lib/hobbit/client/ext/apt

in @stamp_files add "/var/lib/apticron/last_run" and remove "/var/lib/apt/lists/lock".

before:
my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apt/lists/lock);
after:
my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apticron/last_run);
ascent at tosca:~$ ls -l /var/lib/apticron/last_run
ls: cannot access /var/lib/apticron/last_run: No such file or directory

That depends on another package I suppose?

The previous solutions work no matter what.

Wouter
list dOCtoR MADneSs · Tue, 05 May 2009 12:18:21 +0200 ·
quoted from Rasmus Simon-RiegelRasmus Simon-Riegel a écrit :
i made a little change in /usr/lib/hobbit/client/ext/apt



in @stamp_files add "/var/lib/apticron/last_run" and remove "/var/lib/apt/lists/lock".



before:

my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apt/lists/lock);

after:

my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apticron/last_run);



works fine in lenny



Rasmus



Christoph Berg schrieb:

  
Re: dOCtoR MADneSs 2009-04-30 <user-7298952df550@xymon.invalid>

    
On my side I just changed my crontab :



apt-get update && touch /var/lib/apt/lists/lock



so if the update is succesfull, the mtime of /var/lib/apt/lists/lock is

changed, and the apt plugin reports green.

      
Ah, looks like using a lock file doesn't update the mtime. I didn't

notice until now as I'm using the "all-included" hack suggested in

apt.pl:



44 */4  * * *   root  ! apt-get -qq update 2>&1 | grep -q . && date -u > /var/lib/apt/update_success



Unfortunately apt-get update even returns 0 in case of some errors

(iirc unknown apt-keys etc.), so this command checks for an empty

output of apt-get -qq update instead.



(http://bugs.debian.org/526894)



Christoph

    
Hi,

/var/lib/apticron directory doesn't exists on my lenny hosts
list Rasmus Simon-Riegel · Tue, 05 May 2009 13:05:40 +0200 ·
with apticron it was simple to get a regularly updated lockfile.
you never work with this tool, i have not thought about it.


Rasmus
quoted from Wouter Schoot

Wouter Schoot schrieb:
Rasmus Simon-Riegel wrote:
i made a little change in /usr/lib/hobbit/client/ext/apt

in @stamp_files add "/var/lib/apticron/last_run" and remove "/var/lib/apt/lists/lock".

before:
my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apt/lists/lock);
after:
my @stamp_files = qw(/var/lib/apt/update_success /var/lib/apt/periodic/update-stamp /var/lib/apticron/last_run);
ascent at tosca:~$ ls -l /var/lib/apticron/last_run
ls: cannot access /var/lib/apticron/last_run: No such file or directory

That depends on another package I suppose?

The previous solutions work no matter what.

Wouter

list Wouter Schoot · Wed, 06 May 2009 00:07:56 +0200 ·
dOCtoR MADneSs wrote:
/var/lib/apticron directory doesn't exists on my lenny hosts
Probably because the package is not installed.. ?

Wouter