How to add personalized service to host

Hi, I installed check_mk and installed the ubuntu agent on the server where check_mk is located, so far so good and I see the discovered services.

I wanted to add a check on the log file /var/log/message and the capacity of the /tmp directory.

I added a new service from the services tab “Setup > Services > Service monitoring rules > Filesystems (used space and growth)” and added the service as follows

but can’t find a way to hook it to the specific host?

any help?

thanks

Hi Ibrahim,

If you want to check more than the Agent returns as Default, you will need a Plugin.

To check /var/log/messages you can use the Logwatch Plugin. I described that in this Video:

Capacity is automatically monitored for all file systems. So if you mounted /tmp as an own partition, it would appear as service. There is also a File info Checks where you can count Sizes of Files in certain directories, but for your use case, I would recommend an own /tmp partition.

The Rule you have found is then for the Threshold for this Partition, and therefore will currently not work.

1 Like

How do I set up this control? “There is also a file information control where you can count the size of files in certain directories”
thanks

That would be descripted here:

But I would not advise using this to monitor the size of a Directory like /tmp.

Also, there are plugins in Exchange directly for Folder Size, sadly outdated:
https://exchange.checkmk.com/p/dir-size-1
Or even one by me:
https://exchange.checkmk.com/p/dir-size

But someone would need to port it to Checkmk 2.2

Hi,
Bastian’s plugin has already been ported to Checkmk 2.x:

Karl

ok, last question, now I am using the free edition and I know that after the 30 days it will be with the same functionality as the enterprise, but limited to 25 hosts and a total of 750 monitored services, can you confirm me these numbers?

possibly is it possible to downgrade later to the raw version without having to reconfigure the hosts and what would be the services of the raw?
Thank you

The Hosts are not limited, but the Services are. But on average, it will be about 25 hosts.
You can change anytime to RAW, but you will lose your History and Metric Data since the corce changes from cmc to old nagios. Services will still work.
There can also be a hiccup on the downgrade, where you need to use omd config to set the core.

The RAW has no limits, but therefore the core is Nagios which, on the other hand, is a limit (performance, speed). Also, there is no Agent Bakery and no reporting.

No pull request, so never noticed. But good to know, thank you :slight_smile:

Your git repo is not linked from the entry in the exchange…

1 Like

hello @bkuhn,
I was trying the various solutions you mentioned, but mounting /tmp as filesystem I see it by doing df -h:

usermk@checkmk:~$ df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              783M  1.5M  782M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv   98G  8.8G   85G  10% /
tmpfs                              3.9G     0  3.9G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              3.9G     0  3.9G   0% /tmp
/dev/sda2                          2.0G  130M  1.7G   8% /boot
/dev/sda1                          1.1G  6.1M  1.1G   1% /boot/efi
tmpfs                              3.9G  5.0M  3.9G   1% /opt/omd/sites/monitoring/tmp
tmpfs                              783M  4.0K  783M   1% /run/user/1000

but I don’t see it as filesystem on cmk despite relaunching the check “software discovery” and i see only:
image

Hello Ibrahim,

This is because you mounted the /tmp as a ram disk, is this really intended?
Because this can bring troubles when rebooting etc. That the site ~/tmp is a ramdisk, has diffrent reasons. And the Site ~/tmp is not the system /tmp