The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Servicenow - PostgreSQL - pattern extension to read pg_hba.conf

ExtremeDigital
Tera Contributor

Hello, can someone help me inform how I can create a pattern extension for the PostgreSQL database to read its configuration file pg_hba.conf and store it in a CI attribute?

3 REPLIES 3

Mannapuram
Tera Guru

@ExtremeDigital There is an out of the box Discovery Pattern for PostgreSQL, click on the 'New' Button of the 'Extension Section'.  After that, navigate to this pg_hba file and try to get data you need and add it to CI Attribute. Please find attached screen shot. 

Mannapuram_0-1756496114034.png

If you had never done an extension section configuration, explore this course on Servicenow University, where they explain/train you in detail, on how to get the info related iTunes and append it back to CI Attributes. This course will help you do the current task efficiently. 

Discovery Fundamentals On Demand (Course)

Thank you. I'm already working on an extension but I'm not sure how to create the command to read the pg_hba.conf file.

@ExtremeDigital  As part of the Identification Pattern, the config file already discovered, and data is populated. If you want a similar Config file to be discovered, you can follow the steps used in Identification pattern from Step 7 onwards and make similar ones for pg_hba.conf file. 

I am not able to exactly help you, because I don't have any Postgre SQL DB to test/connect. You can connect in 'Debug' mode to an example one and explore these steps. Once you get good understanding, you can create similar steps in Extension Part of Pattern. 

Mannapuram_0-1756499518982.png