Icinga Web - Adding host with Agent

This forum was archived to /woltlab and is now in read-only mode.
  • Tried to add a host using the agent, have it configured and it added it to the "host" group, but getting this error for the hosts.


    I have checked and double checked my plugins folder and re-installed plugins.
    guide here


    -please see attached image of the error-



    I am new to icinga and how it works. any help would be appreciated.


    thanks,
    Aaron

  • You'll need to install the plugin. That one is AFAIK not included in the monitoring plugins package, but the docs should link where you can get it from.

  • Well I was able to find the apache plugin and resolve it, now it is looking for an SCP.exe


    Not sure where this is coming from or why it is looking for an .exe?


  • do I need to pull that from the web client, or the console? like I said, I am still learning where everything is with this application. gotta be a little more specific. what folder / file name is it?

  • What dnsmichi is saying is to show your configurations for where you installed NSClient++ and where you defined the host on Icinga2.

    WudChuK wrote:

    do I need to pull that from the web client, or the console?

    Configurations will always be located on the "console" or backend. These files are generally located in "/etc/icinga2/conf.d/" on your Icinga2 server.


    1. Did you install an Icinga2 agent on the Windows server with NSClient++?
    2. What version of NSClient++ do you have installed?


    See this thread that I posted about a month ago about integration with Icinga2 and NSClient++. The ultimate solution for me was to not use the most recent version of NSClient++, but to use the one included with the Icinga2 Windows Agent installation process (0.4.x).

  • I have followed this guide, but when I get to the part about "importing" the template I do not see that option. and it seems the version used as a guide must be a little older too.


    Working with Agents and Config Zones


    I have been able to create the Icinga Agent template, but not sure about how to import it? and why I do not see the "agent" tab as described in the guide "screenshot".



  • Ah, I had not noticed that you were using Director.


    You must first add a template specifying that you're using an agent, as shown here in my screenshot when get to the area for when you want to add a host:



    Then, you need to use that template to create a new host, from which you can then import.

  • thanks, I have included a video of my progress. still getting an error when I try to deploy.


    icinga_director_template


    if I put anything in the "command" field it will just give me an error. what commands can be used with the agent template?


    thanks,
    Aaron

  • This error occurs because you need to specify a Check command in the host template. I can see there is none specified at 0:04 - 0:18, under the "Check execution" section.


    I generally specify my Check command to "hostalive" so that I can see when the host is up or down.


    After you do that, you can then create services and apply them to that host to check for the other things that you want, for example, the disk space checks or memory usage that you probably are aiming for.

  • so much thanks, I feel like I am making progress.


    so I still have the id10t question, what commands are compatible with the agent? as shown in my video there are a ton of commands that were imported over when director was kickstarted.


    Service commands and error


    and also, with my first attempt with a service I am getting the error about "Remote Icinga instance 'BULS-IS04.barrette.wan' is not connected to 'buls-icinga'", on the windows host - I have the agent installed, token generated and applied successfully, port 5665 open in \ out in firewall. anything I am missing?


    thanks again for the help!

  • All the commands in the windows-plugins and nscp libraries should be compatible with the Icinga2 Windows agent and the NSClient++ agent that you have installed (I assume?) as well.


    This error that you're receiving likely arises because of this error that I may have identified in this thread that I made concurrent with yours. We have very similar problems! I realize through this troubleshooting that Director may not work in the way that I want it to (given that it is still new). Please read the whole thread (most importantly, the last post by me) because it contains very valuable information to your goals.


    As for a workaround, I explained that in the thread that I linked as well. If you'd like more information, let me know!

  • you would figure based on the service preview, and I selected show resolved preview - that the host name has been entered and could find it.


  • Yes, but the host_name attribute is not the same as the Endpoint name of the agent. If you look in your Icinga2 configs, you should see that in /etc/icinga2/repository.d that there is a bunch of configs relating to the agent (endpoints, hosts, zones).


    For the configs to work, they must match up to the Endpoint's name. The problem is that you cannot create a Host of the same name of the Endpoint because you can't have multiple Host definitions of the same name.


    It seems like (to me) that the only workaround is the way that I manually configured it (at this moment). I'm continuing my thread here since it was asked to be moved to the Director forum.

  • ok, side question.


    have you had any luck without using the agent and using the SNMP commands?


    I can't find any info on how to configure or set them up.


    -thanks

  • Yes, you first have to configure the device to be able to use SNMP. For instance, a Buffalo NAS unit requires you to go into the web interface and enable SNMP (set community strings, ports, IPs). After that, you may need to configure certain firewall rules that you have in place so that Icinga can communicate to the NAS. You can then configure Icinga to use the SNMP commands (either via Director or manually).


    If you'd like more insight, lemme know!

  • so trying the same procedure with the snmp command as a service template added to a host. I am getting an "permission denied error" when it deploys..


    and here is a link to a video of me setting it up in icinga: SNMP Error


  • Yes, you first have to configure the device to be able to use SNMP. For instance, a Buffalo NAS unit requires you to go into the web interface and enable SNMP (set community strings, ports, IPs). After that, you may need to configure certain firewall rules that you have in place so that Icinga can communicate to the NAS. You can then configure Icinga to use the SNMP commands (either via Director or manually).


    If you'd like more insight, lemme know!

    if you have some time to go over a few things, that would be very much appreciated!

  • Hey WudChuK,


    Sorry for the late reply! I was on vacation.


    I remember having this problem for a different check that I was performing. This may be (in my case) due to the Icinga2 Service account not having the correct permissions. You can fix this by going into the Services tool under Administrative Tools in your Windows machine and going into the Properties for the Icinga2 service (shown below).



    From there, click on the Log On tab and change the Log on as option to Local System account (shown below):



    Doing this should allow you to run the service from your Icinga server. There may be other steps, let me know where this gets you.