{"id":46320,"date":"2024-05-24T04:45:26","date_gmt":"2024-05-24T04:45:26","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=46320"},"modified":"2024-05-29T03:05:08","modified_gmt":"2024-05-29T03:05:08","slug":"icinga2-how-to-install-icinga-modules","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/icinga2-how-to-install-icinga-modules\/","title":{"rendered":"icinga2: How to install icinga modules?"},"content":{"rendered":"<pre class=\"wp-block-code\"><span><code class=\"hljs\">Installing Icinga modules typically involves several steps, depending on whether you are adding a module to Icinga 2 or Icinga Web 2. Below, I'll outline the general process for both scenarios, emphasizing the common steps required to install a module in Icinga Web 2, as this is where most modules are utilized to enhance functionality.\n\nGeneral Steps for Installing Icinga Web 2 Modules:\nDownload the Module:\n\nFirst, you need to download the module. This is often done by cloning the module from its Git repository. You can find official modules on the Icinga GitHub page and third-party modules through community sources.\nInstallation Directory:\n\nModules need to be placed in the correct directory. For Icinga Web 2, this is typically \/usr\/share\/icingaweb2\/modules. You may need root permissions to write to this directory.\nClone the Module:\n\nFor example, to install the Director module, you would use the following commands:\n\n$ cd \/usr\/share\/icingaweb2\/modules\n$ sudo git clone https:\/\/github.com\/Icinga\/icingaweb2-module-director.git director\n$ sudo git checkout $(git describe --tags `git rev-list --tags --max-count=1`)\n\nPermissions:\n\nSet the correct permissions so that the web server user (usually www-data on Debian\/Ubuntu systems) can read the module files:\n\n$ sudo chown -R www-data:www-data \/usr\/share\/icingaweb2\/modules\/director\n\nEnable the Module in Icinga Web 2:\n\nLog in to Icinga Web 2 with administrative privileges.\nNavigate to Configuration -&gt; Modules.\nYou should see the new module listed there. Click on it, and you will likely have an \"enable\" module option. Click it to enable the module.\nConfigure the Module:\n\nSome modules, like the Director, require additional setup, such as database configuration. Usually, after enabling a module, you can configure it via the Icinga Web 2 interface under the module's configuration section.\nFor example, for Director, you would set up a database and then configure these settings in the Director's web interface.\n\nRestart Icinga 2:\n\nIt\u2019s often a good practice to restart the Icinga 2 service to ensure all configurations are properly reloaded:\n\n$ sudo systemctl restart icinga2\n\nSpecific Steps for Icinga 2 Modules (Core Extensions):\nIf you're installing a core extension or plugin for Icinga 2 itself (not the web interface), the process might involve simply placing executable files in the appropriate directory (like \/etc\/icinga2\/conf.d) and configuring them within Icinga 2\u2019s configuration files.<\/code><\/span><\/pre>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[8217],"tags":[],"class_list":["post-46320","post","type-post","status-publish","format-standard","hentry","category-icinga"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/46320","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=46320"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/46320\/revisions"}],"predecessor-version":[{"id":46321,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/46320\/revisions\/46321"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=46320"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=46320"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=46320"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}