When trying to automate everything sometimes the tools you use can hold you back. An example is monitoring, where old systems (like nagios) are difficult to automate because they have no remote control API.
MK-livestatus is an extension for Nagios/Icinga (and built-in for Shinken) that allows retrieving information or sending commands via an Unix Domain Socket (UDS).
x
seconds (where x
can be configured
but usually has a value of 5-10). The MK-livestatus page suggests either using SSH or xinetd to expose the socket to the network. While exposing the socket over TCP is a security nightmare, both suggestions have another issue in common!
The output format from MK-livestatus is not very pleasant to work with (due to performance concerns).
For example if you ask for JSON, you'll get something like
[['field1', 'field2', 'field3'],
['value1', 'value2', 'value3']]
Basically the first list is the list of column names, and then you get a list
with the values for every row.
If you restrict the displayed columns like so :
Columns: field_1 field_2
you'd just get
[['value1', 'value2']]
so get ready to parse your own query (or add a Column-Headers section to it).
Awesome, right?
Wouldn't it be nice to access the livestatus API over HTTP (being able to build in
authentication and so on) and at the same time get cool responses like:
[{'field1': 'value1', 'field2': 'value2', 'field3': 'value3'}]
?
With livestatus-service, this is possible. You can even select an index (say field1)
and get something like
{'value1' : {'field1': 'value1', 'field2': 'value2', 'field3': 'value3'}}
YADT an Augmented Deployment Tool
Copyright (C) 2010-2016
Immobilien Scout GmbH
Licensed under GNU GPL v3
2016-05-11 10:48:37 +0000