Seite wählen

NETWAYS Blog

LConf 1.4.2 with Icinga 2 export, LConf Web Bugfix releases

lconf_logo_2LConf 1.4.2 contains several bug fixes, and adds export compatibility for the Icinga 2 2.0.0 configuration syntax again. There were massive changes ongoing ever since Icinga 2 0.0.9 which rendered the feature unusable for a while now. Luckily the Icinga team (yeah, me too actually) finally released Icinga 2 2.0.0 on Monday, so we’ve fixed LConf 1.4.x in order to make LConf users happy as well 🙂 logo_icinga3
LConf for Icinga Web 1.4.0 contains plenty bugfixes and now follows the same version schema such as the LConf backend. The standalone Web has been updated too.
Keep in mind that the Icinga 2 export does not add any new features introduced with Icinga 2 2.0.0 (apply rules, etc) but only acts as compatibility layer, replacing any required migration script around. If you are interested in the new capabilities Icinga 2 (configuration) introduces, join the Icinga 2 training (I am one of the trainers) – or fetch the latest iX magazine special issue featuring an Icinga 2 article written by me.
Have fun with LConf!

Weekly Snap: LConf & ACL, OSMC & OSBC Call for Papers

weekly snap5 – 9 May packed in tips for LConf, spreadsheets and streaming clients, three events and Puppet webinar too.
On events, Eva announced our Call for Papers for the Open Source Monitoring Conference and the Open Source Backup Conference, while Bernd headed off to Linux Tag in Berlin.
Christian continued, with a webinar on Puppet and Foreman as Dirk set up restricted user accounts in LConf using ACL.
Finally, Thilo made spread sheet magic with the help of the Ruby Gem, Roo and Marius compared Chromecast, Apple TV and Roku Stick.

Wie kann ich einen Teil meiner Arbeit loswerden? – Oder: LConf und ACL

Da ich persönlich eher zu den faulen Menschen gehöre und sich bestimmt jeder Admin auch dazu zählen kann, will ich in diesem Blogpost darauf eingehen wie man zumindest die Aufgabe Monitoring ein wenig auf fleißige Kollegen oder auch Azubis und Praktikanten verschieben kann. Natürlich möchte man sich im Nachhinein nicht mehr Arbeit gemacht haben, indem man Fehlersuche betreiben muss, daher ist mein Ansatz: graphische Administration und eingeschränkte Berechtigungen.
Unser Werkzeug für graphische Administration LConf dürfte mittlerweile wohl bekannt sein. Wem dieses gar nichts sagt kann sich ja mal das Webinar anschauen. Kurz zusammengefasst verwendet LConf ein LDAP-Backend, bietet Vererbung und Templates sowie ein hübsches Frontend.
Gebe ich nun dem Azubi eine kurze Einweisung und volle administrative Rechte, sehe ich mich schon statt beim Feierabend-Bier beim Restore und anschließendem „Hätte ich’s bloß gleich selbst gemacht“ und „Wenn etwas richtig gemacht werden soll, muss man es selber machen“. Und damit sich niemand diskriminiert fühlt, gilt das gleiche natürlich für alle anderen Kollegen wie Windows- oder Netzwerk-Admins. 😉
Diese Grundhaltung höre ich doch des öfteren bei Kunden und Schulungsteilnehmern, daher müssen also eingeschränkte Rechte her und dies ermöglicht LDAP zum Glück leicht mittels ACL. Voraussetzung hierfür ist ein Benutzer oder eine Gruppe innerhalb des LDAP. Da der LConf-Connection-Manager mir erlaubt eine Verbindung zu erstellen und dann einer Gruppe Zugriff auf diese zu erlauben, reicht mir ein Benutzer.
Diesen lege ich mir folgendermaßen an:

  1. Passwort-Hash generieren:
    # slappasswd
    New password: awesome
    Re-enter new password: awesome
    {SSHA}ZOmXcrADeKGkthMlJ3PZwKbyM8bnbP5t
  2. Datei user.ldif für den Import bauen:
    dn: cn=myuser,ou=users,dc=icinga,dc=lab
    objectClass: organizationalPerson
    cn: myuser
    sn: User
    description: My User
    userPassword: {SSHA}ZOmXcrADeKGkthMlJ3PZwKbyM8bnbP5t
  3. Benutzer mit administrativem Account einspielen:
    ldapadd -x -h localhost -D cn=admin,dc=icinga,dc=lab -W -f user.ldif

Nun muss ich mir überlegen wie meine Grundstruktur aussieht und worauf ich meinen Benutzer berechtigen will. Mein Ansatz ist hierbei dem Kollegen auf einen Teilbaum gemäß seiner Zuständigkeit schreibend zu berechtigen und Templates sowie grundlegende Objekte lesend zur Verfügung zu stellen. Hierfür müssen die Standard-Zugriffsregeln teilweise gelöscht werden bevor die neuen gesetzt werden, da diese in der gespeicherten Reihenfolge abgearbeitet werden.
Die Vorgehensweise ist hierbei:

  1. Datei access.xml für Import bauen:
    changetype: modify
    dn: olcDatabase={1}hdb,cn=config
    delete: olcAccess
    olcAccess: to dn.base="" by * read
    -
    delete: olcAccess
    olcAccess: to * by self write by dn="cn=admin,dc=icinga,dc=lab" write by * read
    -
    add: olcAccess
    olcAccess: to dn.base="dc=icinga,dc=lab" by users read
    -
    add: olcAccess
    olcAccess: to dn.base="ou=LConf,dc=icinga,dc=lab" by users read
    -
    add: olcAccess
    olcAccess: to dn.base="ou=IcingaConfig,ou=LConf,dc=icinga,dc=lab" by users read
    -
    add: olcAccess
    olcAccess: to dn.subtree="ou=global,ou=IcingaConfig,ou=LConf,dc=icinga,dc=lab" by users read
    -
    add: olcAccess
    olcAccess: to dn.subtree="ou=Templates,ou=LConf,dc=icinga,dc=lab" by users read
    -
    add: olcAccess
    olcAccess: to dn.subtree="ou=myconfig,ou=IcingaConfig,ou=LConf,dc=icinga,dc=lab" by dn="cn=myuser,ou=users,dc=icinga,dc=lab" write
    -
    add: olcAccess
    olcAccess: to * by self write by dn="cn=admin,dc=icinga,dc=lab" write
  2. Importieren unter Nutzung der ldapi-Schnittstelle:
    ldapmodify -Y EXTERNAL -H ldapi:/// -f access.ldif

Nun noch in dem Wissen, dass die Kollegen nicht so leicht was kaputt machen können, die Verbindung im LConf-Frontend angelegt, die Kollegen berechtigt und eine Einweisung im Wiki hinterlegt. Danach heißt es dann heim zum Feierabend-Bier während die fleißigen Kollegen mit den neuen Rechten Hosts und Services ins Monitoring aufnehmen! 😉
In diesem Sinne viel Erfolg beim Verteilen der Arbeit und natürlich Prost!

Dirk Götz
Dirk Götz
Principal Consultant

Dirk ist Red Hat Spezialist und arbeitet bei NETWAYS im Bereich Consulting für Icinga, Puppet, Ansible, Foreman und andere Systems-Management-Lösungen. Früher war er bei einem Träger der gesetzlichen Rentenversicherung als Senior Administrator beschäftigt und auch für die Ausbildung der Azubis verantwortlich wie nun bei NETWAYS.

LConf 1.4.1 released

This release only contains plenty of bug fixes, most of them address problems with the Icinga 2 export introduced in LConf 1.4.0. Furthermore this release adopts the introduced change with host/service dependency configuration from Icinga 2 0.0.8 release on tuesday.
Thanks for the patches to Alexander Leisentritt and Thomas Gebhardt. Special thanks to Jörg Monpetain (VHV) for hunting the bugs with LConf 1.4.0 and Icinga 2 and testing all the provided fixes!
Download the tarball.
Changelog

  • Icinga 2: Changed host/service dependency export for Icinga 2 0.0.8 export #2374 #2503
  • Icinga 2: Fix checkcommand vs servicecheckcommand #2392
  • Icinga 2: Fix missing host event_command attribute #2394
  • Icinga 2: Fix custom macro export #2400 #2416 #2418 #2455
  • Icinga 2: Fix regexp for {host,service}groups (Thomas Gebhardt) #2443
  • Icinga 2: Fix missing host checks #2402
  • Icinga 2: Sanitize trailing whitespaces on timeperiod keys #2406
  • Icinga 2: Fix CV prefix for _HOST/_SERVICE macros #2414
  • Icinga 2: Fix parents not exported as host dependencies #2441
  • Icinga 2: Fix reload command in LConfDeployIcinga2.sh #2384
  • Fix host dependency export (Alexander Leisentritt) #2370
  • Fix link to a service adds all other services on the same level #2453
  • Fix spec file #2382 #2386

LConf 1.4 supporting Icinga 2

There have been many questions targetting Icinga 2 and a configuration gui such as LConf. As promised to users and customers during OSMC 2013, LConf ships the first step towards a succesful migration from Icinga 1.x to Icinga 2: The LConf Backend supports exporting the LDAP configuration tree in native Icinga 2 configuration syntax.
The frontends (LConf Standalone Web, LConf for Icinga Web) remain untouched and will support your daily work. If configured, the LConf Export backend will automagically convert the required changes (new notification objects between services and users, check command macros or the newly introduced optional host check, etc. ). An additional deployment script has also been added, even though distributed monitoring using the new Icinga 2 cluster stack should be considered during migration 😉

# mkdir /etc/icinga2/conf.d/lconf
# sudo -u icinga /usr/local/LConf/bin/LConfExport.pl -o /etc/icinga2/conf.d/lconf --format 2
# service icinga2 restart

Besides that, the 1.4.0 release ships community contributed patches such as a configurable ldap port (thanks Lukas Matecki), additional debug output and plenty of bug fixes. Check the Changelog in the documentation. Download LConf 1.4.0 now (or give the package repository a shot) and let us know what you think 🙂
During upgrade, make sure to update your config.pm (especially for Icinga 2 export). Please report bugs and features requests to the LConf Backend bug tracker.