Forum Discussion

Kev_Pearce_1070's avatar
Kev_Pearce_1070
Icon for Nimbostratus rankNimbostratus
Aug 29, 2006

Error when defines a class data-set

Hi,

 

 

Whenever I try and create a class, so I can use a matchclass, I get an error message back:

 

 

line 1: [undefined procedure: class] [class test_class {

 

 

Full, very simple, code is:

 

 

class test_class {

 

"www.abc.com"

 

}

 

when HTTP_REQUEST {

 

pool pool1

 

}

 

 

Tried outside and inside the HTTP_REQUEST code block...

 

 

I've also tried a couple of the code share's that have class data-sets defined and get the same error...

 

 

Any ideas???

 

 

Cheers very much all

 

 

Kev/.

2 Replies

  • Hi,

     

     

    Make sure you're creating the datagroup (class) definition in the GUI under iRules | Datagroups. There is a separate tab for datagroups next to the iRules tab. If your class is made up of strings, select a type of string.

     

     

    The format you have above is how it would look in the bigip.conf file. If you want to add the class definition to the bigip.conf file, edit it with vi or pico and add the object definitions in and run 'b load' to load the new configuration to memory.

     

     

    You can then reference the class in the rules.

     

     

    Aaron
  • Ah! Thank you.

     

    I always use the iRule editor and just found the Data Groups editor inside it!

     

    Cheers

     

    Kev/.