Extend the IBM i Administration Runtime Expert With Custom Plug-ins
Creating custom plug-ins for Administration Runtime Expert extends functionality
When you use the ARE console to create and edit your deployment templates, various types of attributes are externalized via plug-ins. As reviewed in the post last week, there are a variety of plug-ins that are provided with the product to easily define the attributes you want to verify, such as file and directory attributes, PTFs, system values and others.
ARE allows you to create custom plug-ins. This feature is a powerful way to extend ARE functionality. ARE plug-ins are simply Java programs that extend the base plug-in functionality. It's easy to code whatever unique verifications you require. There are methods you can use to log information to the summary and detailed report, just as the IBM-supplied plug-ins do. You can also set up your own fix actions to allow ARE to correct identified issues.
I have written quite a few custom plug-ins including:
- A plug-in that retrieves the Collection Services configuration and compares the settings with recommended best practices. If the configuration isn’t ideal, there’s a fix action you can use to configure collection services with a click of the mouse. This example is very useful in an environment involving dozens or hundreds of partitions. Rather than manually configuring Collection Services on every partition, let ARE do it for you!
- A plug-in that reports what NetServer shares are mapped. If root (/) or /QIBM are mapped, the plug-in reports an error. Other shares that are mapped are listed in the detail report. This plug-in can easily be extended to check for any mapped shares and whether they are read-only or read-write. Read-write shares can be an exposure for ransomware.
- A plug-in that checks the status of the IOA cache batteries and the SSD fuel gauge, and reports errors and warnings based upon the output of these utilities.
A major advantage of using ARE with custom plug-ins, particularly in environments where there are many IBM i partitions to manage, is that ARE sends the jar file with the custom plug-in logic to the endpoints during the validation process, then cleans up after itself. You have a single copy of the Java source and a single jar file for your plug-in. ARE sends that jar file to the endpoints. Yes, you could do some of this same functionality with your own programs, but you would also have to take care of distributing and maintaining that program on all endpoints. ARE plug-ins manage this automatically for you.
IBM provides a sample.jar file with some simple examples. I found the samples to be a bit too simple for practical use in writing my first plug-in. However, IBM does provide some basic documentation on writing custom plug-ins, and this documentation is helpful. Knowing how to use the Java Toolbox is a definite advantage.
If you are interested in learning more about custom plug-ins, please contact me at [email protected] for more information.
About the author
Dawn May is an IBM i consultant. She owns Dawn May Consulting, LLC in the Greater Boston area. Dawn is a former IBM senior technical staff member.
See more by Dawn May