Wednesday, June 16, 2021

#861 Some Ideas for OIC Fleet Management

 










As you can see, the above graphic is WIP.

I am getting some ideas together on this and seeing how the OIC Monitoring APIs can help me out here.

Use case is I have a fleet of OIC instances and need some intel on them.


Connections 

Here I want a list of my configured connections and their status - I will write the salient data to a file -

Here is an excerpt from the output file - 

























I use the following apis - 


 

















I test these in Postman to get the response JSON for use in defining the OIC Invokes - 

I orchestrate the calls via an OIC integration - creating a REST connection to my OIC instance.













The above part creates the output file using the FILE STAGE action.














I now invoke the OIC REST api to get the configured connections -
















The Map for q is as follows - I am looking for all configured connections with the prefix AA- (these all belong to me)





I then write the connection name to the file (WriteConnectionDetails) -



















Then I test the individual connections (TestConnection) - Invoke configured as follows -














Now to the Scope Fault Handler -


 
















As you can see, I specifically check for Locked Connections - 

Final step is to write the file created by STAGE FILE to an ftp directory - I am using the embedded OIC File Server here.

Connectivity Agents











Here I check the status of OIC agents, using the following api -


 

 

This returns a list of agents within their agent groups -

Let's look at one of my agents - 












Here is the relevant json - 






...







All the salient info is here - agent group, agent name and status.

Output file extract - 





I won't go into great detail on the integration here - suffice to say I use the same OIC REST connection as follows -


 

notice the 2 For Each Loops - 

The first loop -








The second loop - 









Integration Errors

Here I call the following 2 apis - 















First I invoke Retrieve Errored Instances and iterate over the errored instances, invoking Retrieve an Errored Integration Instance.














The output file is as follows - 











Conclusion

I got these basic samples together very quickly. Naturally, I could have written the data to a DB instead of to a file. Essentially, I could have pushed this data anywhere. 

I mentioned fleet in the title, i.e. more than 1 OIC instance. My REST api connection for leveraging the OIC Monitoring included the hardcoded OIC instance url, so I would need such a connection for each OIC instance, or else use another form of authentication.

 


No comments: