Model & Manufacturer for Apache Hbase

nicks8850
Tera Expert

Hi Experts,

 

does anyone know as how to set model and manufacturer for Hbase Instance application discovered using probes and sensors?

 

I know these are OOTB probes and sensors which discover the Hbase but leave the model and manufacturer blank for them. Has anyone worked on such requirement in past? Appreciate any help here.

 

 

Thanks,

Nirmal Sharma

 

1 REPLY 1

kmohammed
Tera Guru

Hi Nirmal,

 

This is expected with the out-of-box HBase discovery. On a CI, Manufacturer is the company on the linked Model record, and Model is the model_id reference to the Product Model table (cmdb_model) - Discovery only fills them when the payload carries make/model data that can be matched or created as a model. The HBase probes/sensors discover the instance, version and configuration from the host process, but nothing in that payload identifies a hardware-style make/model for the application instance, so both fields are left empty.

 

To populate them, do it in this order:

 

1. Create the model once. Go to Product Models (cmdb_model) and check whether an entry already exists for it - if not, create one with Manufacturer = Apache Software Foundation (create that company record first if it is not present) and Name/Model number identifying Apache HBase. Every HBase instance will point at this single model record, and the Manufacturer on the CI then comes from the model.

 

2. Backfill the existing instances. The instances are in the HBase instance table (cmdb_ci_hbase_instance, under Application). Set model_id on those records to the model from step 1 - a one-time list update or a short background/fix script that queries cmdb_ci_hbase_instance where model_id is empty and sets it is enough; the manufacturer display follows the model.

 

3. Make it stick for new discoveries. Do not edit the out-of-box sensor directly - it will be overwritten on upgrade and the sensor does not have make/model to set in the first place. The upgrade-safe way is a small before insert business rule on cmdb_ci_hbase_instance (and, if you also want to correct records found without it, before update with an "model_id is empty" condition) that sets current.model_id to your HBase model record. Because the rule runs for records created by any source, newly discovered instances get the model from their first discovery onwards.

 

Two related notes:

- Avoid setting manufacturer directly on the CI without the model - the CI manufacturer is derived through the model relationship, so records set that way tend to drift back or report inconsistently in model-based reporting.

- If you later move HBase to pattern-based discovery (or build a custom pattern for it), the equivalent place is the pattern itself: patterns resolve make/model through the MakeAndModelJS helper and create the model in the same way, so you would retire the business rule at that point to avoid double handling.

 

Regards,

Karimuddin