1753430 Members
4741 Online
108793 Solutions
New Discussion

iMC compliance checks and jython scripts

 
FranckG
Visitor

iMC compliance checks and jython scripts

Hi,

is there any documentation about writing advanced compliance checks with custom jython scripts ?

 

The default policies already use jython scripts to make some specific check, like Vlan Tag.py or BPDU Filter.py.

I would like to write a custom script to check vlan configuration consistency on a given set of device interfaces.

 

Thanks.

5 REPLIES 5
Peter_Debruyne
Honored Contributor

Re: iMC compliance checks and jython scripts

Hi,

 

I cannot help with a sample script, I can just refer you to this video for a basic compliance example:

http://www.youtube.com/watch?v=LdqPLa0dgHU

 

I would also recommend to post the request on http://www.netopscommunity.net/ , a dedicated IMC forum, where some guys have already developed custom scripts for backup/restore of Fortinet devices for instance,

 

Best regards,Peter

 

LindsayHill
Honored Contributor

Re: iMC compliance checks and jython scripts

I thought I did have some examples somewhere, but I've been digging around, and can't find any specifics. Might have been something I saw last year at HP Discover. Quite agree that we need some good examples and API documentation here.

 

I tried reading some of the .py scripts, but they didn't help much!

FranckG
Visitor

Re: iMC compliance checks and jython scripts

Hi Peter,

thanks for the info.

I will look at both.

 

 

Best regards,

Franck

 

FranckG
Visitor

Re: iMC compliance checks and jython scripts

 

Northlanboy,

 

As the choice to use a jython script is given when creating a rule, yes it should be documented.

 

I've also look at the given scripts before posting here. Some are "understandable", like those who just check the value of an SNMP oid (like TC notification count), however nothing to really write an "advanced" check.

 

Another way I'm investigating at the moment is using the eAPI to reach my initial goal. There is at least a documentation for it. However I really want to use the compliance center and not an external custom application/script to make the job.

 

Btw, thanks for your reply.

 

Best regards,

Franck

LindsayHill
Honored Contributor

Re: iMC compliance checks and jython scripts

The eAPI is pretty cool, and sometimes it's the right answer, but I understand why you'd want to do it "inside" IMC itself.

 

Do let us know how you get on - if you do manage to work out how to do it, there's plenty of others would like to know!