Reports grouped by (user added) Host attribute?
Hello,
New user to IT Analytics. I had a question, if anyone has added custom host attributes and figured out how to reference them in the SQL query commands.
A few days ago Ernie graciously walked me though adding custom host attributes and I was able to load the values to the ITA database for an attribute ie: 'Svc_Grp'. Using the Ad Hoc occupancy report, as one example - I am trying to group/sum the aggregation of all hosts matching a given value in that added attribute. Total noob question, as I have yet to digest the ITA training as of yet. If I can reference that added attribute I think I can tweak the stock template to pull by this attribute.
TIA !
Take a look at APT_V_SERVER_ATTRIBUTE. That view shows a row for each host (aka client) in the system, followed by a column for each attribute name. In some cases (e.g. LOCATION => LOCATION_1) the column for the attribute will have an "_1" appended.
To add attributes, you will join APT_V_SERVER_ATTRIBUTE to other views. For example, to add the ENVIRONMENT attribute to a client report based on APT_V_JOB, the code snippet would be:
SELECT DISTINCT j.client_name,
sa.environment
FROM apt_v_job j,
apt_v_server_attribute sa
WHERE j.client_id = sa.host_id