Im pulling my hair out trying to write a trigger that I believe should be rather simple. I have two item keys that Im trying to check values on. Independently, I can evaluate either of them and the trigger works as expected. For instance, I can do this...
{router1:ssh.run[int0.5].regexp(ONLINE)}=0
<Trigger trips when the key returns something other than ONLINE>
or
{router1:ssh.run[int0.20].regexp(OFFLINE)}=0
<Trigger trips when the key returns something other than OFFLINE>
These work well and the value being returned by those keys is of type 'text'. However, what I really want to do is write an expression that looks like this...
{router1:ssh.run[int0.5].regexp(ONLINE)}=0 and {router1:ssh.run[int0.20].regexp(OFFLINE)}=0
So if for instance, the key int0.20 changes to something other than offline, I would expect the trigger to fail. However, that's not happening at all. For some reason, when the int0.20 key changes the trigger doesnt trip.
I've tried changing regexp to str and that doesnt seem to help either.
Any ideas? I cant sort out what Im doing wrong here.
{router1:ssh.run[int0.5].regexp(ONLINE)}=0
<Trigger trips when the key returns something other than ONLINE>
or
{router1:ssh.run[int0.20].regexp(OFFLINE)}=0
<Trigger trips when the key returns something other than OFFLINE>
These work well and the value being returned by those keys is of type 'text'. However, what I really want to do is write an expression that looks like this...
{router1:ssh.run[int0.5].regexp(ONLINE)}=0 and {router1:ssh.run[int0.20].regexp(OFFLINE)}=0
So if for instance, the key int0.20 changes to something other than offline, I would expect the trigger to fail. However, that's not happening at all. For some reason, when the int0.20 key changes the trigger doesnt trip.
I've tried changing regexp to str and that doesnt seem to help either.
Any ideas? I cant sort out what Im doing wrong here.
Comment