hobbsh / icinga2-autod

Basic auto discovery for Icinga2
GNU General Public License v2.0
25 stars 9 forks source link

adding discovered_hosts.conf to icinga2 #4

Closed sirajkrm closed 7 years ago

sirajkrm commented 8 years ago

hi great thank's for the script just want to ask about how to add this config file to icinga2 / icingaweb2 ? i'm running CentOS 7 on v sphere & here's the output when i run the script [root@localhost icinga2-autod]# ./icinga-autod.py -n 172.20.0.0/24 Starting scan for 172.20.0.0/24 Scan took 3.63055610657 seconds Found 69 hosts - gathering more info (can take up to 2 minutes) Unable to open iana_numbers.json, trying URL method. Please wait

Discovery took 149.985216856 seconds Writing data to config file. Please wait Wrote data to discovered_hosts.conf

hobbsh commented 8 years ago

Hi,

It will output the discovered_hosts.conf into the same directory you ran icinga_autod.py from. You should be able to drop it (or cut/paste) it into your icinga hosts config, which by default on RHEL/CentOS should be in /etc/icinga2/conf.d/hosts.conf - if you have multiple collectors it will go somewhere in zones.d depending on how you set things up.

sirajkrm commented 7 years ago

hi thank's for response i have managed to add all hosts in icinga2.. appreciate your help. but what i got here just ping of the network hosts however the local machine (CentOS 7) which has Icinga installed in it gets everything about it (http, ping ssh etc...) i wonder if possible.. can you modify the script to manage to get everything about the hosts. thank's in advance.

hobbsh commented 7 years ago

Hi, you will have to work out hostgroups and service dependencies yourself. I don't provide support for Icinga2, but the documentation is pretty comprehensive.

https://docs.icinga.com/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2-first-steps