Do the files in /omd/sites/mysite/var/check_mk/notify/spool get deleted after the notification

I am using Checkmk 2.0 and currently have over 8000 files in the spool directory. Are these files suppose to get deleted? If so what do I need to check to make sure they get deleted?

1 Like

Hi ekeicof,

there are different possibilities to setup things and you need to tell us a bit about your checkmk environment and (expected) notification setup.
Generally speaking, these files should not be there and should be automatically processed by the service mknotifyd.
You can check its service state with

omd status <sitename> mknotifyd

The logfiles are in

/omd/sites/<sitename>/var/log/mknotifyd.log
/omd/sites/<sitename>/var/log/mknotifyd.state

And i think the notify log is also a interesting to take a look at:
/omd/sites/<sitename>/var/log/notify.log

1 Like

Hi aeckstein,

Thanks for your reply. mknotifyd is running, I send out email notifications when there is a problem. This is what I am seeing in the mknotifyd.log on a notification.

2022-12-25 10:07:23,002 [10] [cmk.store] Trying to acquire lock on /omd/sites/factory/var/log/mknotifyd.state
2022-12-25 10:07:23,002 [10] [cmk.store] Got lock on /omd/sites/factory/var/log/mknotifyd.state
2022-12-25 10:07:23,002 [10] [cmk.store] Releasing lock on /omd/sites/factory/var/log/mknotifyd.state
2022-12-25 10:07:23,002 [10] [cmk.store] Released lock on /omd/sites/factory/var/log/mknotifyd.state
2022-12-25 10:07:26,006 [15] [cmk.mknotifyd] Skipped 6975 spool files, we have no established connection.
2022-12-25 10:07:26,007 [20] [cmk.mknotifyd] got exit code 0
2022-12-25 10:07:26,007 [20] [cmk.mknotifyd] processing spoolfile f266bf6e-34a5-414a-8dfb-77d87640559f successful: success 250 - b’2.0.0 2BPG7Oq02429611 Message accepted for
delivery’

I see there is a corrupted file which I can delete in the mknotifyd.state file

[root@uslllx0001 log]# cat mknotifyd.state

mknotifyd - current state

Version: 2.0.0p19
Updated: 1672161710 (2022-12-27 11:21:50)
Started: 1671984376 (2022-12-25 10:06:16, 177334 sec ago)
Configuration: 1671984376 (2022-12-25 10:06:16, 177334 sec ago)
Listening FD: None

Spool: New
Count: 8152
Oldest: 1663786467 (2022-09-21 13:54:27, 8375243 sec ago)
Youngest: 1663786467 (2022-09-21 13:54:27, 8375243 sec ago)

Spool: Deferred
Count: 0
Oldest: -
Youngest: -

Spool: Corrupted
Count: 1
Oldest: 1666726079 (2022-10-25 14:27:59, 5435631 sec ago)
Youngest: 1666726079 (2022-10-25 14:27:59, 5435631 sec ago)

Queue: mail
Waiting: 0
Processing: 0

I have noticed when I get a lot if files in the spool directory I start having problems with the email notifications. I will manually remove them at that point.

1 Like

Hey,

what is your configuration settings in Setup - Global Settings - Notifications - Notification Spooling ?

1 Like

It is set to Asynchronous local delivery plus remote forwarding

1 Like

Forwarding means, that you forward the created notifications in a distributed setup to another checkmk server.
Is this what you want to achieve?
If not, this is the reason for your problem and you can set the setting to asynchronous local delivery only.

1 Like

This error also indicates, that there is no remote notification spooler configured, where the local spooler can send its notifications to.

1 Like

I set it to Asynchronous local delivery by notification spooler, which is the default. I did not see asynchronous local delivery only as an option.

1 Like

That is what i meant :slight_smile:
You need to delete the files manually after that, they will not be cleaned up automatically i guess

1 Like

Thanks aeckstein, that fixed the problem. I am not sure how it was changed from the default setting. I did not change it.

2 Likes

Setup - Global Settings - Notifications - Notification Spooling, changing the setting to Asynchronous local delivery by notification spooler like you recommended was the solution to my problem.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.