Custom SNMP Trap Definition
First, I'm a bit confused at the regex that I should be using to match the log. An example syslog message is:
Certificate 'mywork.com' in file mywork.com.crt will expire on Fri Nov 11 23:59:59 2011 GMT
.. so, my thought is to create a regexp that will match something similar to "Certificate * in file * will expire on," but I haven't gotten this to work correctly yet. Here is what I tried using:
"Certificate \'[\w\.]+\' in file \'[\w\.]+\' will expire"
That did not work, so I'm guessing it is not correct. I was able to match it via "will expire on," but this is a bit too generic and I would rather match it more accurately.
Next, how do I name the trap like the pre-defined traps are. The trap is coming through to my NMS as something generic like "bigIpNotifications.300"
The log message is contained in bigipNotifyObjMsg, but is there a way that I can separate the variable fields (such as the certificate file name, date, etc) into separate fields like bigipSSLCertName, etc so I can parse them on my NMS? All of the pre-defined traps seem to be parsed separately like this.
Josh