Hi,
I am implementing a ticket search system for our operator to find out the priority of the ticket triggerred by snmp monitoring.
For example,
In my search table I have put in the following sample message.
PROBLEM <server> syslog: vmunix: SCSI: Read error -- dev: b 31 0x042700, errno: 126, resid: 2048,
PROBLEM <server> vmunix: FW-1: only 50 internal hosts allowed
PROBLEM interface down on <IP Address>
Once an alarm was recevied let say
PROBLEM interface down on 178.1.2.3
The operator will search for this message pattern and once they find the correct matches, they will enter into a separate page which will need to find out who is the system owner of this IP address or hostname (lookup from separate table).
Sometimes the operator might get "PROBLEM interface down on myserver1"
instead of ip address.
In my sample message I will use <server> tag to indicate hostname or ip address position in the message. I want to create function which be able intelligent to find the hostname or ip address from the message.
For example
sample message:
PROBLEM <server> File System Full: /tmp on <server>
user input:
PROBLEM server1 File System Full: /tmp on server...
The two string lenght might be different but I should from left to right to find out <server> location and then from the submit input I should be able to find out server1 is the hostname in the message. This can then pass to lookup the system owner from the device table.