Proof of concept – visualizing the CMDB

Jens Bothe15. Nov 2010 | ConsultingDevelopmentUse cases

Disclaimer:

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.

Situation

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.

Example output

Example output

Example output

How to use

Please follow these simple (ymmv) steps

  1. grab a *ix of choice
  2. install graphviz
  3. 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)
  4. modify the script at the beginning
    Please insert the correct credentials to have read permissions on the OTRS database
  5. run the script and save the output to e.g. test.dot
    sh prepare_dot.sh > test.dot
  6. run dot to generate the diagram
    dot -Tpdf test.dot -o test.pdf

Be warned

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.

Further Reading

[graphviz] – http://www.graphviz.org/

Download

→ visualCMDB

Have ((fun))

#5
Jens at 20.11.2014, 18:15

Why it should?

#4
yorfeix at 20.11.2014, 16:32

Too bad that there is still no integration in OTRS or at least a running package vor the newer OTRSs.

#3
wolfgangf at 22.11.2010, 08:47

Very good Idea! would be great if integratet into OTRS

#2
marco at 16.11.2010, 14:28

good start for a visual cmdb ! thank you for the sharing

#1
Tweets that mention Proof of concept – visualizing the CMDB - OTRS Community Blog -- Topsy.com at 15.11.2010, 22:13

[...] This post was mentioned on Twitter by Christopher T. Kuhn, Daniel Ciaglia. Daniel Ciaglia said: Proof of concept – visualizing #OTRS CMDB with the help of #graphviz | http://bit.ly/9Bn0SH [...]

Your email address will not be published.