om_http retry

Tags:

#1 pbaer

It appears that nxlog continually retries when trying to send a log. Is there a way to limit the amount of retries and continue on if it fails over x amount of times?

My issue is this, if the body of the request is bad, I will get a 400 as a result. This means, I could get stuck trying to send a bad message over and over.

#2 b0ti Nxlog ✓
#1 pbaer
It appears that nxlog continually retries when trying to send a log. Is there a way to limit the amount of retries and continue on if it fails over x amount of times? My issue is this, if the body of the request is bad, I will get a 400 as a result. This means, I could get stuck trying to send a bad message over and over.

I don't think there is any logic coded into om_http to handle data differently based on the response code. It's a tricky thing to handle correctly to decide what should happen to the data that does not go through (drop, retry, write into a rejection file, etc).

FYI, there is support for perl, python and ruby (though some of this is EE only) which may help in implementing such REST API integrations. It might be also easier to fix these scripts as a user instead of relying on the hard-coded behavior of om_http.