"check_logfiles does not exist"

I have installed the plug in check_logfiles on a satellite. However, the Icingaweb displays “the plug in does not exist”. But I have installed it correctly on the satellite and it is also listed in /usr/lib/nagios/plugins. Does anyone have a hint for me?

That’s displayed under:

Plugin-Ausgabe

Attribute ‘ido_type’ must be set

Where and how can I do that?

ido_type is for the IDO check which would be unrelated. Something odd is in the config here.

Can we see the Service object in play here? Also, were you using the logfiles command definition from the template library or did you create a command object for it?

1 Like

Hi!

Did you create the Service Object for that check via manual config or is it created via director ?

Also the check_logfiles check from consol doesn’t have ido_type attribute neither does the itl template have it.
https://labs.consol.de/nagios/check_logfiles/

Also what is the check source does the check_logfiles exist on the check source ?

1 Like

object Service “test_check_logfiles” {
host_name = “test”
check_command = “check_logfiles”
check_period = “always”
enable_notifications = true
enable_active_checks = true
enable_passive_checks = true
zone = “master”
command_endpoint = host_name }

via Director

check_logfiles is on the master and on the log source (agent).

What check source does Icinga Web 2 show under check execution?
image

Can you please show the command definition, are you using the logfiles command provided by the ITL or did you create a definition yourself? (as @blakehartshorn asked)

this needs to be (if you refering to logfiles):

check_command = “logfiles”

1 Like

object CheckCommand “check_logfiles” {
import “plugin-check-command”
command = [ PluginDir + “/–logfile=/var/log/pruef_log.log” ]
timeout = 1m
vars.logfiles_logfile = “/var/log/pruef_log.log”
}

Well, this will never work.
I suggest you use the logfiles command from the ITL, as @rsx said.

Yes. which command should I use?

I’ve change it back to :
command = [ PluginDir + “/check_logfiles” ]

Same issue.

this one, as it is already defined

Why is the service “test_check_logfiles” in the “master” zone, when you are complaining that it doesn’t run on the satellite? This is is another way of posing log1c’s question about the check source shown…

When check_logfiles tells you, that ido_type has to be set, there’s something really wrong. This error message comes from the ido check, not check_logfiles.

Please do not change the code of the Command Definitions in ITL. Whenever you run an update, they will be overwritten without checking for changes. If the ITL is not working please make double and triple sure that your local setup is flawless. If it still doesn’t work out, file an Issue on GitHub.

What I can tell from the comments so far it should be a problem with where the check is running as others said.

Hi!

Because there was no further answer i wanted to know if it is solved now for you or is this still an ongoing issue that you face ?

Regards

David

Hi bricasti,

I’ve found the culprit which makes your problem so hard to find it seems that in some installations the logmanagement.conf in icinga2-common package doesn’t include the check_logfiles command part.
It’s completly missing.

In this case you really have to edit the logmanagement.conf file and add the missing part or replace the file whatever suits your needs best.

https://github.com/Icinga/icinga2/blob/35f53c0dc1b14795d34ce4345d573957483701e1/itl/plugins-contrib.d/logmanagement.conf.

After changing the file you would need a director kickstart to import the check_logfile definition.

Then you should be able to use like log1c said before the command with check_command = “logfiles”

Regards

David

HI,

To make it a bit more easy for us. Please post the complete output of

icinga2 object list --type checkcommand --name logfiles

from master and agent.
The complete output of

ls -la /usr/lib/nagios/plugins

and the complete output of your service definition (replace HOSTNAME & SERVICENAME with the names of your hosts/service)

icinga2 object list --type service 'HOSTNAME!SERVICENAME'

Regards,
Carsten

P.S.: @dokon never ever edit the ITL files :slight_smile:

1 Like

Hi Carsten !

Thanks for reminding me on the rule, but the part what she is looking for is. “Really” didn’t make it into the icinga2-common package it is incomplete & missing. So i think in this case we need to make an exception with don’t touch the itl files.

Thats also the reason why i added the link to the github file where it is complete.
I’m sure i find out the mysterious reasons why it is missing in the icinga2-common package internally but this might better fit into an episode of scooby doo and the mysterie of the wrongly packaged file.

Also thanks for the icinga2 object list commands, and check for the plugin itself and it’s location.

Regards

David

2 Likes

Sorry for the late answer. My job was all over me.

I’ve reinstalled it all new and now it is working. I don’t know why.

1 Like

Hi !

No Problem, as mentioned by Carsten above it’s usually pre-packaged by us.
So there is no need at all to edit the files, except our build workflow didn’t include the complete File.

My Guess is that the re-install scrapped the incomplete package and you’ve installed the now one with the full itl file which properly includes the check_command definition.

Anyway don’t let that scare you off, please feel free to ask again if you encounter another problem.

Regards

David

1 Like