Forum Discussion

14 Replies

  • Yes.

     
     when HTTP_REQUEST { 
     HTTP::respond 204 
     log local0. "Sent a 204!" 
     }  
     

    ...Will go to /var/log/ltm.

    -Matt
  • will this log be cumulative?

     

    This 204 irule when invoked will send out hundreds of thousands of 204's every hour.
  • Yeah you probably don't want to do that then, you'll fill up /var/log very quickly. You could log to a localX facility that you set up to send to a remote syslog server, but there's not really a good way to get statistics like you are looking for out of an iRule. You could increment a counter variable each time it was sent, but I can't think of a way to periodically log that counter.

     

     

    Denny
  • You could use the 'b rule send_204_rule stats' to view the number of times the HTTP_REQUEST event has run since the config was last reloaded. Or as Denny suggested, you could use a global variable which counts the execution time. You'd want to add logic to log the current total every X number of seconds or X number of executions (Codeshare example: Click here). Or you could use a stats profile (article: Click here). The stats is accessible via the GUI (and should be accessible via SNMP, but due to a bug, CR117258, this doesn't work in 9.4.6).

     

     

    Aaron