cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.
Joe_Pruitt
Cirrostratus
Cirrostratus

Problem this snippet solves:

This sample goes along with the Tech Tip titled Session Table Exporting With iRules . It creates a mechanism for you to export the data from your session tables for archiving or external reporting.

NOTE: It will be necessary: To fix the following line: //--></script>

To be a normal script tag: //-->

Code :

when HTTP_REQUEST {
  switch -glob [string tolower [HTTP::uri]] {  

    "/exporttable" {
      HTTP::respond 200 Content {
iRule Table Exporter
Comments
Sunkwan_Kim_147
Nimbostratus
Nimbostratus

Sorry, I can't understand last lines. " //--> " to be " //--> " ??

 

Sunkwan_Kim_147
Nimbostratus
Nimbostratus

There is one little mistake.

 

In line 5, "Content" is to be "content" and then It works properly.

 

Thanks Joe 🙂

 

Arnaud_F_
Nimbostratus
Nimbostratus

Very Usefull. Thanks.

 

Tested on v15.1. I just made the following change on the line 49 :

HTTP::respond 200 Content $csv "Content-Type"

must be replaced by

HTTP::respond 200 content $csv "Content-Type"

Version history
Last update:
‎18-Mar-2015 15:20
Updated by:
Contributors