Event Console - Livestatus events extraction

Hello everyone,

I am trying to do something. Does anyone know how can be done?

I did an update from 1.2.8 Raw to 1.6.0p17 Raw. After the upgrade one of my scripts stopped.
The script has the job to connect to /omd/sites/instance_name/tmp/run/mkevetd/status via UNIX socket and to extract all events with specific event_application. In the old version the command - command = “GET events\nFilter: event_application ~ ^” + type, but know does not.

I tried from the shell with that command - echo “GET events” | unixcat /omd/sites/tncoper/tmp/run/mkeventd/status and returned all of the events.

Can you give me some clue?

My code.

class CMKSocket():

def __init__(self, sock_params):
    """Create INET or UNIX(local) socket

    :param sock_params: Socket parameters (path or socket in format ip:port)
    :type string
    :returns: Socket
    :rtype: Socket Object
    """

    if ':' not in sock_params:
        # Obviously it is a UNIC socket path
        return self.sock(socket.AF_UNIX, sock_params)
    else:
        (ip, port) = sock_params.split(':')
        return self.sock(socket.AF_INET, (ip, int(port)))

def sock(self, sock_type, sock_conn):
    try:
        self.sock = socket.socket(sock_type, socket.SOCK_STREAM)
        self.sock.connect(sock_conn)
    except Exception as e:
        print
        "Error connecting to UNIX socket: %s" % str(e)

def sock_close(self):
    if self.sock:
        self.sock.close()

def get_events_type(self, type):
    try:
        command = "GET events\nFilter: event_application ~ ^" + type

        print ("The command is = {0}".format(command))
        print (self.sock)
        print (self.sock.gettimeout())
        self.sock.send(command)
        response_text = ""
        while True:
            chunk = self.sock.recv(8192)
            print ("The chunk is {0}".format(chunk))
            response_text += chunk
            if not chunk:
                break
        # self.sock.close
        return eval(response_text)
    except Exception as e:
        print
        "Error connecting to UNIX socket: %s" % str(e)

Hi,
since version 1.2.8 a lot of things changed e.g. Event Console. From version 1.5. Event Consoel use livestatus table instead of own one.
The socketpath to events now ~/tmp/run/live and the table for the GET statement is “eventconsoleevents”.
I hope this will bring you forward.

Cheers,
Christian