Forum Stats

  • 3,727,169 Users
  • 2,245,331 Discussions
  • 7,852,618 Comments

Discussions

How to add 2 columns to EM 13.3 dashboard report

926052
926052 Member Posts: 3
edited July 2020 in Enterprise Manager

I have a script designed to identify key fields for our inventory report in OEM 13.3.  I need to add 2 additional columns to it.  Column order doesn't matter to me.

--add AVAILABILITY_STATUS
MGMT$AVAILABILITY_CURRENT.AVAILABILITY_STATUS
WHERE mgmt$target_properties.target_guid = MGMT$AVAILABILITY_CURRENT.target_guid
https://docs.oracle.com/cd/E63000_01/EMVWS/monview.htm#EMVWS12346

--add TARGET_TYPE
MGMT$AGENTS_MONITORING_TARGETS.TARGET_TYPE
WHERE mgmt$target_properties.target_guid = MGMT$AGENTS_MONITORING_TARGETS.target_guid
https://docs.oracle.com/cd/E63000_01/EMVWS/targetviews.htm#EMVWS32321

The current working script is attached.

Thank you for your time.

Answers

  • Nishant Baurai
    Nishant Baurai Member Posts: 215
    edited July 2020

    I have addedd 2 columns.

    SELECT

        t.host_name                                                            AS host,

        ip.property_value                                                      ip,

        t.target_name                                                          AS name,

        decode(t.type_qualifier4, ' ', 'Normal', t.type_qualifier4)   AS type,

        dbv.property_value                                                     AS version,

        environment.property_value                                             AS environment,

        project.property_value                                                 AS project,

        os.property_value                                                      AS os,

        location.property_value                                                AS location,

        kisam_group.property_value                                             AS kisam_group,

        port.property_value                                                    port,

        sid.property_value                                                     sid,

        logmode.property_value                                                 AS "Log Mode",

        oh.property_value                                                      AS "Oracle Home",

        avail.availability_status                                              AS "Avilibility Status",

        t.target_type                                                          AS "TARGET TYPE"

    FROM

        mgmt$target  t,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'DBVersion'

        )            dbv,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'orcl_gtp_lifecycle_status'

        )            environment,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'orcl_gtp_line_of_bus'

        )            project,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'orcl_gtp_os'

        )            os,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'orcl_gtp_location'

        )            location,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'orcl_gtp_cost_center'

        )            kisam_group,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'Port'

        )            port,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'SID'

        )            sid,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'log_archive_mode'

        )            logmode,

        (

            SELECT

                p.target_guid,

                p.property_value

            FROM

                mgmt$target_properties p

            WHERE

                p.property_name = 'OracleHome'

        )            oh,

        (

            SELECT

                tp.target_name AS host_name,

                tp.property_value

            FROM

                mgmt$target_properties tp

            WHERE

                    tp.target_type = 'host'

                AND tp.property_name = 'IP_address'

        )            ip,

        (select

        ac.AVAILABILITY_STATUS,

        ac.target_name

        from MGMT$AVAILABILITY_CURRENT ac

        ) avail

    WHERE

            t.target_guid = port.target_guid

        AND port.target_guid = sid.target_guid

        AND sid.target_guid = dbv.target_guid

        AND dbv.target_guid = environment.target_guid

        AND environment.target_guid = project.target_guid

        AND project.target_guid = os.target_guid

        AND os.target_guid = location.target_guid

        AND location.target_guid = kisam_group.target_guid

        AND kisam_group.target_guid = logmode.target_guid

        AND logmode.target_guid = oh.target_guid

        AND t.host_name = ip.host_name

        and avail.target_name=t.target_name

    ORDER BY

        1,

        3;

Sign In or Register to comment.