Wednesday, May 22nd 2013, 3:18am UTC+2

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to Monitoring-Portal.
Although this is a german monitoring forum, please don't hesitate to post in English. Nearly everybody here understands you and will answer in English as well.
If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form to register here or read more information about the registration process. If you are already registered, please login here.

reb

Beginner

Posts: 10

Location: Hamburg

Number of monitoring servers: 3

Nagios Version: none

Icinga Version: Icinga-1.7

Distributed monitoring: Ja

Redundant monitoring: Nein

Number of hosts: 140

Number of services: 1200

OS: Linux

Plugin Version: ?

NDO Version: 2

Other Addons: PNP4Nagios, Thruk, MK Livestatus

1

Thursday, August 9th 2012, 10:01am

MK-Livestatus und log rotation?

Hi,

wir haben hier MK Livestatus (1.1.12p7-1~bpo60+1) via icinga/modules laufen und lassen MK Livestatus auch loggen:

Source code

1
2
3
4
module_name mklivestatus
module_type neb
path /usr/lib/check_mk/livestatus.o
args = /var/lib/icinga/rw/live log_file=/var/log/icinga/mk_livestatus.log


Irgendwann sollte das Logfile ja mal rotiert werden und ich frage mich gerade wie ich MK Livestatus dazu bewege
nach dem Rotieren das neue Logfile zu verwenden - ein icinga reload reicht hier wohl und könnte via postrotate ein-
gebaut werden.

Gibt es noch einen anderen Weg (ausser das Logging auszuschalten)?

Gruß
Ralf

pitchfork

Administrator

Posts: 18,436

Location: Kassel

Occupation: Sysadmin SAP / Linux / AIX

Number of monitoring servers: 2

Hobbies: Motorrad fahren, wenns die Zeit erlaubt :-)

Nagios Version: 3.2.3 ( OMD )

Distributed monitoring: Nein

Redundant monitoring: Nein

Number of hosts: 360

Number of services: 6700

OS: Debian 6.0

Plugin Version: 1.4.x

Other Addons: SNMPTT, NagTrap, check_mk, PNP-0.6.x. Thruk

2

Thursday, August 9th 2012, 10:06am

CopyTruncate verwenden um geöffnete Files zu rotieren.

http://linuxcommand.org/man_pages/logrotate8.html

Quoted


copytruncate
Truncate the original log file in place after creating a copy,
instead of moving the old log file and optionally creating a new
one, It can be used when some program can not be told to close
its logfile and thus might continue writing (appending) to the
previous log file forever. Note that there is a very small time
slice between copying the file and truncating it, so some log-
ging data might be lost. When this option is used, the create
option will have no effect, as the old log file stays in place.
+++ PNP Developer +++ PNP 0.6.21 ist online ! +++
Hilfreiche Infos gefunden? Dann schnell ein paar Cent flattrn
OMD - Open Monitoring Distribution

reb

Beginner

Posts: 10

Location: Hamburg

Number of monitoring servers: 3

Nagios Version: none

Icinga Version: Icinga-1.7

Distributed monitoring: Ja

Redundant monitoring: Nein

Number of hosts: 140

Number of services: 1200

OS: Linux

Plugin Version: ?

NDO Version: 2

Other Addons: PNP4Nagios, Thruk, MK Livestatus

3

Friday, August 10th 2012, 2:34pm

CopyTruncate verwenden um geöffnete Files zu rotieren.

http://linuxcommand.org/man_pages/logrotate8.html


Danke für den Hinweis - werde ich probieren...

Ralf