So, this is driving me nuts. I really dont understand how I could get the commands working in the director. CLI is working fine, no issues there. I´ve even gotten the powershell self service portal working but i cannot even figure out how to get a simple command working.
So to start with my director is totally empty of commands, perhaps it should be like that. hostalive and other simple checks working from the cli is not working from the director. I always get a fault about the lookup location /usr/lib/nagios/plugins. Lets proceed with a check that is actually located there like check_ping.
SO in the command i have written check_icmp and arguments "H x.x.x.x -w 3000.0,80% -c 5000.0,100% -p 5
I have tried with $HOSTNAME$ the actual fqdn or short dns (which is working from the server) and i always get, failed to resolve
I have tried with PluginDir + /check_icmp
I have tried more simple arguments and always failed to resolve.
I cannot understand how hard it should be…I thought DIrector should make things more simple
How do i get check like for example hostalive to work in director. Or basically anything to work?
first, how did you install Icinga 2 and the Director? The docs points you to running the kickstart wizard which also imports the pre-defined check commands from the Icinga Template Library. That being said, commands like hostalive or disk should already exist.
Each command in the Director needs exported fields as arguments, that’s a manual step you need to go before defining an actual host, service template and apply rules/service sets.
You don’t need to re-create icmp for example. That’s already available and ready-to-use. Navigate into Commands > External Commands and search for it.
Hello Michael, I followed the guide in the official library. Everything seemed to work fine. However I do not have any external commands. A search results in nothing.
Yep I am trying to keep it simple, and it´s a lot harder than nagios. Part of it could be the absence of all commands though.
So do I have to rerun the kickstart wizard. is it possible or how do I get the commands.
Well it depends if you are talking about this part. I have done this and it worked fine. I did all the steps but I still don´t have any external commands
Then maybe your Icinga Installation does not know about your command? icinga2 object list --type checkcommand should show lots and lots of entries. (19911 lines in my case) If that’s the case, we can rule this source of error out.
Yep, that is correct. I have a similar amount of rows running that command. Exactly 19981
So all the commands seems to be there but doesn´t load in the director
What exactly does the message say? (In the icingaweb2 interface I assume?)
Does the constant PluginDir point to the correct directory, where the plugins are located.
Are there any error messages when running the kickstart wizard?
Hello log1c. Well it basically says that the check isn´t in that directory. Which it isnt. What i found strange was that ordinary checks like hostalive wasn´t available in director. But something musta have gone wrong during the kickstart I imagine even though I am 100% certain it went well without issues
Plugindir points to const PluginDir = “/usr/lib/nagios/plugins”
I don´t know if that is standard or not but there are only a couple nagios checks available there
For running the command from the CLI you need a kickstart.ini file:
# icingacli director kickstart run --help
Trigger the kickstart helper
============================
This will connect to the endpoint configured in your kickstart.ini,
store the given API user and import existing objects like zones,
endpoints and commands.
/etc/icingaweb2/modules/director/kickstart.ini could look as follows:
[config]
endpoint = "master-node.example.com"
; Host can be an IP address or a hostname. Equals to endpoint name
; if not set:
host = "127.0.0.1"
; Port is 5665 if none given
port = 5665
username = "director"
password = "***"
if you do the whole thing via the web interface the director will ask these information to be input by you.
Michael: It is 1.7.1
log1c: Great Thanks, I will try running that from CLI aswell. I did the kickstart using the GUI the first time. seemed to work fine, but i figure it didn´t
Just wanted to let you know that rerunning the kickstart wizard through the cli solved the problem. All the commands are now available. Thanks alot for the help! I am sure things will get a lot easier now to start with atleast