Proof of concept – visualizing the CMDB
Jens Bothe15. Nov 2010 | ConsultingDevelopmentUse cases
The practical examples presented in our technical blog (blog.otrs.com) and now in the expert category in our FAQ blog section serve as a source of ideas and documentation to show what is theoretically possible with OTRS in concrete scenarios or sometimes even for more exotic configurations. All configurations presented here were developed under laboratory conditions as a proof of concept.
We can only guarantee testing and implementation of these concepts to be error-free and productive if implemented in a workshop with one of our OTRS consultants. Without this, the responsibility lies with the customer himself. Please note that configurations from older OTRS versions may not work in the newer ones.
Imagine a nicely built CMDB with a lot of interconnected items. You can follow the links manually in your browser but sometimes you get a better hold on information and structures by visualizing them.
The OTRS CMS is such a case: many classes, items and connections between them. I hacked a small bash script which reads the database and generates a file suitable as input for the graphviz project’s [graphviz] dot program.
How to use
Please follow these simple (ymmv) steps
- grab a *ix of choice
- install graphviz
- download the zip archive containing
– prepare_dot.sh (the mentioned bash-script)
– test.dot (some example data)
– test.pdf (example result as PDF)
– test.png (example result as PNG)
- modify the script at the beginning
Please insert the correct credentials to have read permissions on the OTRS database
- run the script and save the output to e.g. test.dot
sh prepare_dot.sh > test.dot
- run dot to generate the diagram
dot -Tpdf test.dot -o test.pdf
The script relies on some shell functionality and built-in functions and was tested with a current Bash on Debian stable. It may or may not run with other shells. Please adopt the script to your needs.
The script uses mysql to gather the nessesary data from the DB. It may be possible to use a PostgreSQL or other command line client – please adjust to your needs too.
The output may be strange and not satisfying for your data model – graphviz was developed for interconnected data. If your CMDB is just plain storage, then a visualization doesn’t make sense.