Bug 13246 - monit error: Include failed -- No such file or directory '/etc/monit.d/*'
Summary: monit error: Include failed -- No such file or directory '/etc/monit.d/*'
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: Will only affect a few users Minor Usability
Assignee: Matthias Fischer
QA Contact: Jon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-15 14:58 UTC by Jon
Modified: 2024-05-28 17:04 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon 2023-08-15 14:58:41 UTC
I installed monit on IPFire.  There was no previous pakfire monit installed.  

[root@ipfireAPU ~] # /etc/rc.d/init.d/monit start
Starting monit...
/etc/monitrc:251: Include failed -- No such file or directory '/etc/monit.d/*'
Starting Monit 5.33.0 daemon with http interface at [localhost]:2812                                           [  OK  ]
[root@ipfireAPU ~] #
Comment 1 Matthias Fischer 2023-08-15 16:36:23 UTC
Funny that this didn't came up before.

It seems like you and I are the only ones using 'monit' this way... ;-)

=> https://lists.ipfire.org/pipermail/development/2023-August/016318.html
Comment 2 Jon 2023-08-15 16:45:15 UTC
it *may* have happened when I started using monit.  I was probably to new to understand!

Thank you!
Comment 3 Adolf Belka 2023-08-15 20:30:32 UTC
I am using monit and I just checked by stopping and restarting monit and I don't see that error message.
I have the directory /etc/monit.d/ but there is nothing in the directory.

In the monitrc at the end I have the line include /etc/monit.d/*
Comment 4 Adolf Belka 2023-08-15 20:33:56 UTC
I checked back to an actual reboot and the monit message i9s the same as for stopping and starting it with the services table.

So I( don't see what you see.

Not sure what I am doing different.

I am only using it to monitor IPFire at the moment so not a lot of monitoring options set.
Comment 5 Jon 2023-08-15 21:34:01 UTC
for me this was a fairly new IPFire install.  

And then I installed monit for the first time on Aug 15.
Comment 6 Adolf Belka 2023-08-16 12:54:07 UTC
I think I installed monit more than a year ago. I probably saw the error message about a missing /etc/monit.d/ directory and as monit is a console program I probably just created the missing directory myself and didn't think anything further about it.
Comment 7 Matthias Fischer 2023-08-28 17:04:47 UTC
Because it just came to my mind:

How do we ship this fix for existing 'monit'-installations?

Something like this in 'update.sh'?

...
# Create missing 'monit.d'-directory
if [ -f /usr/bin/monit.rc ]; then
   mkdir -p /etc/monit.d
fi
...
Comment 8 Matthias Fischer 2023-08-28 17:06:13 UTC
Sorry, typo!

I meant:

# Create missing 'monit.d'-directory
if [ -f /usr/bin/monit ]; then
   mkdir -p /etc/monit.d
fi
...
Comment 9 Jon 2023-08-28 19:28:35 UTC
This sounds OK to me.  

But honestly I'd rather have one of the Developers chime in...
Comment 10 Jon 2024-05-28 17:04:08 UTC
this works for me.