Giter VIP home page Giter VIP logo

icingaweb2-module-puppetdb's Introduction

Icinga Web 2 PuppetDB module

The main purpose of this module is to provide a PuppetDB import source for Icinga Director. As of this writing it has not even a GUI or CLI component, but this may change in future.

To install, please refer to our documentation. Installation and configuration

Note: Some steps require you to be familiar with Puppet/PuppetDB

Screenshot

Icinga Director PuppetDB import

icingaweb2-module-puppetdb's People

Contributors

dgoetz avatar jschanz avatar ocontant avatar thomas-gelf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

icingaweb2-module-puppetdb's Issues

Facts does not work with preview/output with PuppetDB 4

PuppetDB: 4.2.2
icingaweb2-module-puppetdb: 14afc2a
Query Type Nodes
Resource Type Host

Same as #2. Created new issue since that one was closed.

When adding the PuppetDB output, everything seems OK, except that preview does not present any facts in any other colums than the "massive" facts one.

Here's a screenshot. The column names are a bit mangled because wasn't easy to take a scrolling screenshot but you can see the empty columns.

icinga

Trying to apply modifiers to the single facts does not yield any different results either.
The module correctly guesses classes, nodes, resources and the name of the facts but it does not return the data from them.

Individual fact columns are empty so they're not able to be imported as-is or modified in any way. Hope this clarifies the issue. Let me know if you need more info and i'll try to provide.

dynamically assign values to custom properties

Hi, Iโ€™m using icingaweb2-module-puppetdb to import my nodes from puppetdb. Works very nice! Now I would like to use facts from puppetdb in icinga in order to adjust the thresholds for certain checks. For example, load check needs warnings and critical thresholds. For each client I know how many cpuโ€™s are configured (processercount fact from puppet). I want to use this value and dynamically configure the several thresholds according to this value. I already have a data field for every threshold (load_cload1 etc). I use modifiers to map the fact to load_cload5) in icinga. Now I'm trying to use load_cload5 to configure load_wload5, load_cload1 etc.
Is this possible?

Environment

  • Module version (System - About):
    1.0.0
  • Icinga Web 2 version and modules (System - About):
    2.4.2-1.xenial
  • Icinga 2 version (icinga2 --version):
    2.7.1-1.xenial
  • Operating System and version:
    xenial
  • Webserver, PHP versions:
    apache
    php7.1

imported_property table size

We saw recently that the imported_property tablet inside the director mariadb database has a size of 15GB. We found out that most of that size comes from all of our puppet facts for each server.
We have a puppetdb with around 2000 nodes in it. The core facts plus some (20 or so) custom facts.

Expected Behavior

I dont know if thats really a bug, but maybe this table or the facts import needs an improvement.

Current Behavior

This lead to a sitution where the backup of this database took 1,5 hours to complete. This lead to a icinga2 crash because database entries from icinga2 were stored in memory to fast and the out-of-memory killer came in.

Possible Solution

As a workaround we excluded this particular table with "--ignore-table=director.imported_property".
Because the data inside isnt really necessary for a backup I guess.

Steps to Reproduce (for bugs)

  1. Use PuppetDB as import source
  2. Watch the imported_property table

Your Environment

  • Module version (System - About): 1.0.0, Director: 1.4.1
  • Icinga Web 2 version and modules (System - About): 2.5.1
  • Icinga 2 version (icinga2 --version): 2.7.2
  • Operating System and version: RHEL 7.5

How to add a string (facts.disks) (sda > path = /dev/sda and iostats_disk = sda)

Hello,

I added the fact.disks and I get in icinga2 something like:

    vars.disks = {
        nvme0n1 = {
            model = "INTEL SSDPEDMD400G4"
            size = "372.61 GiB"
            size_bytes = 400088457216
        }
        sda = {
            model = "Crucial_CT275MX3"
            size = "256.17 GiB"
            size_bytes = 275064201216
            vendor = "ATA"
        }

but for my apply rules, I need also:

path = /dev/<device>
iostats_disk = <device>

Is it possible with the puppetdb module and the sync rules?

cu denny

Doc on splitting facts for custom vars if array/json/hash

Any suggestions on how to split facts in arrays to get an output where

Input Example:

[{"Name":"ADSync","StartType":2,"Status":4,"CanShutdown":true,"CanStop":true,"CanPauseAndContinue":false},
{"Name":"AeLookupSvc","StartType":3,"Status":1,"CanShutdown":false,"CanStop":false,"CanPauseAndContinue":false},
{"Name":"ALG","StartType":3,"Status":1,"CanShutdown":false,"CanStop":false,"CanPauseAndContinue":false},
{"Name":"AppIDSvc","StartType":3,"Status":1,"CanShutdown":false,"CanStop":false,"CanPauseAndContinue":false},
{"Name":"Appinfo","StartType":3,"Status":1,"CanShutdown":false,"CanStop":false,"CanPauseAndContinue":false}]

Desired output is a key based on the name with the key/value pairs as a subset, example:

vars.windows_service["ADSync"] = {
    name = "ADSync"
    starttype = 2
    status = 4
    canshutdown = true
    canstop = true
    canpauseandcontinue = false
}

The reasoning behind this is to let Puppet discover services that icinga can monitor. I have a script that emits the services on Windows to Puppet, classifying them (Standard windows service, role (AD/IIS) or 3rd party, letting us quickly monitor anything we dont know about), the same is easily done for IIS' websites and AppPools amongst other examples.
With Director we can then almost automate an approval process for everything in Icinga2, letting everything come in "unclassified" and be monitored from day 0, letting the NOC take care of classifying if its production, dev or test by a process going on after its already being monitored, rather than trying to figure out what is on the box. ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

Facts does not work with preview/output with PuppetDB 4

When adding the PuppetDB output, everything seems OK, except that preview does not present any facts in any other colums than the "massive" facts one.

Trying to apply modifiers to the single facts does not yield any different results either.

The module correctly guesses classes, nodes, resources and the name of the facts but it does not return the data from them.
Currently using PuppetDB 4.1.2

Exported resources from Puppet using icinga2 puppet module

Hi,
how to configure sync settings regarding exported variables ? We're using Puppet to generate icinga2 configs, export them to PuppetDB and then collect on icinga master.
We'd like to switch to use this module due to outlined benefits (performance mainly), however when adding new hosts how do we map parameters from PuppetDB into icinga fields, as these already contain all variables?

Add template to host, based on a facts in the PuppetDB

hi,

I try to add a template to hosts, via based on a fact. It works, if I use "certname=host.foo", but I need something like:

Import template "nginx-template", if facts.puppet_modules=nginx, like I have it on the screenshot.

bildschirmfoto vom 2017-11-30 11-00-30

Is that possible?

cu denny

The module is not IcingaDB compatible yet

If you have deactivated the IDO backend including the monitoring module and only activated the IcingaDB front- and backend, you cannot activate the puppetdb module due to an unmet dependency on the monitoring module.

Expected Behavior

Module can be used in environments with IcingaDB

Current Behavior

Module cannot be used in IcingaDB environments at the moment

Possible Solution

Make it IcingaDB compatible :)

Steps to Reproduce (for bugs)

  1. Install Icinga with IcingaDB Front and backend only
  2. Install Icinga Director
  3. Install the Import Source puppetdb
  4. Try to activate puppetdb, you see the unmet dependency info

Context

I want to try the puppet importsource in an IcingaDB environment

Your Environment

  • Module version (System - About):
    • Director 1.10.2
    • Icingadb 1.0.2
    • puppetdb 1.0.0
  • Icinga Web 2 version and modules (System - About): 2.11.4
  • Icinga 2 version (icinga2 --version): v2.13.7

Thanks and cheers,
Marcus

PuppetDB 2.3 kann nur API v3

PuppetDB 2.3.8, wie in Ubuntu Precise enthalten, kann nur API v3. Die Implementierung von v4 ist experimental und anders, als PuppetDB 3+ das macht. Das Modul funktioniert somit also nur mit der Auswahl v3.

Daher vielleicht bei der Auswahl der API Version die 2.3 mit bei V3 auflisten, nicht bei v4.

Clone / import / export sync rules

hi,

I have three PuppetDBs all with many sync rules and I have to add a new PuppetDB. It would be great, if I can clone / export / import the sync rules.

documentation fix for installation

The documentation here includes the following code block:

exec { "Generate combined .pem file for $puppetdb_host":
  command     => "cat private_keys/${my_certname}.pem certs/${my_certname}.pem > private_keys/${my_certname}_combined.pem",
  path        => ["/usr/bin", "/usr/sbin"],
  cwd         => $ssl_subdir,
  refreshonly => true
}

This won't work as listed due to cat being /bin/cat by standard, and NEVER sbin.

The fix is the following:

exec { "Generate combined .pem file for $puppetdb_host":
  command     => "cat private_keys/${my_certname}.pem certs/${my_certname}.pem > private_keys/${my_certname}_combined.pem",
  path        => ["/usr/bin", "/bin"],
  cwd         => $ssl_subdir,
  refreshonly => true
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.