7. • Should I? Why?
• Open Source
• Great community
8. • It’s straight forward
• Icinga Web 2 is stable, future-proof and
easy to understand
• No deep knowledge of PHP, HTML, CSS
and JS required
• So, why not?
9. • Lessons learned from Icinga-web 1.x
• Keep framework overhead at a minimum
• Keep it simple
• No XML
12. • Convention over configuration
• Put things in the right place rather than
having to configure where things are
• Reasonable defaults
• INI config files
13. • Zend Framework 1.x
• jQuery version 1 and 2
• HTMLPurifier, JShrink, Parsedown,
dompdf, lessphp
14. • Where to start?
• Install Icinga Web 2
• Extend the module path
15. • Give the module a name
• Keep it simple
• Reflect what it does
• Module name used in PHP
Namespaces, URLs and paths in the file
system
16. • Create and activate a new module
• mkdir -p /usr/share/icingaweb2-
modules/showcase
• icingacli module list installed
• icingacli module enable showcase
20. • Icinga CLI is designed to offer all
application logic of Web 2 and its
modules also in the CLI
• Helps to provide cronjobs, plugins, tools
and even small services
• Bash autocompletion
21. • Just create a file with the name of the
command in application/clicommands
25. • Namespaces help to encapsulate modules
• Every modules has its own namespace
built from its name:
IcingaModule<module>
• The namespace for CLI commands is
Clicommands
26.
27. • Document your code
• CLI help is generated from
documentation
• Get help with --help
28.
29. • Successful actions return exit code 0
• Erroneous actions print readable error
messages because all exceptions in CLI
are caught
• In this case the exit code is always 1
• Get full stacktrace with --trace