SQL Database query for OpManager

SQL Database query for OpManager

SQL Database query for OpManager

 OpManager allows searches for database information, while logged into the server there is a link at the top right to various links for help and searches.



The image that looks like headphones is the link to support and searches, in this case we are interested in the DB Query



Below are a couple of searches that can be performed

Checking Engine ID of devices

OpManager had an issue with timing out the monitors, but it was successful using the MIB Browser and the Monitors would work after sending a get from the MIB Browser

 To check if the device EngineID seems to be changed when the test fails in OpManager. When the device is added to OpManager using SNMPV3 we will update the device engineid to 2 tables (Enginetable, usmtable)

select * from Enginetable

select * from usmtable

If the device EngineID is changed in the device and still the old EngineID is listed in OpManager we will face this issue. We need to make sure that EngineID in the device and the one configured in OpManager is same when test fails. 

Check for devices in NCM

We received the below inquiry from one of our clients. OpManager tries to log in with “root” credentials to the routers and switches when new ones come on line. This was observed this morning in the logs when I brought isfancabrtr1 online:

*Sep 26 10:40:47: %SEC_LOGIN-4-LOGIN_FAILED: Login failed
[user: root] [Source: 10.208.48.12] [localport: 22] [Reason: Login
Authentication Failed] at 10:40:47 arizona Wed Sep 26 2018

Router is added to NCM module of OpManager. NCM uses CLI to connect to Network Devices for backup operations and may be attempting this with root credentials or root user. 


To see if the device is listed or discovered in NCM use the SQL query against the Probe and check if the device is listed in the output

select * from ncmresource

Search for Serial and FW Version

SELECT DISPLAYNAME,IPADDRESS, DNSNAME, HI.HW_MANUFACTURER, HW_MODEL, HW_SERIALNUMBER, HW_OSVERSION, to_timestamp(ADDED_TIME/1000) as DiscoveredTime, LAST_UPDATED_TIME FROM HardwareInformation HI JOIN ManagedObject mo ON HI.MOID=mo.MOID JOIN OpMDeviceDetails OD ON mo.MOID=OD.MOID JOIN TopoObject tobj ON tObj.NAME=mo.NAME JOIN NODE node ON node.NAME=mo.NAME WHERE ISNODE='true'

 

Discovery Date And Time By Device And Ip Address


SELECT DISPLAYNAME, to_timestamp(ADDED_TIME/1000), IPADDRESS FROM OpMDeviceDetails OD JOIN ManagedObject mo ON OD.MOID=mo.MOID JOIN TopoObject tobj ON tObj.NAME=mo.NAME WHERE ISNODE='true'

TO SEE THE NEXT POLLING EVENT

For polling to work 'ACTIVE' must show true for monitors. If unmanaged ACTIVE will be false

select to_timestamp(timeval/1000), period, name, ACTIVE from PolledData where agent='pccsarrut1.dn.srp.gov.10000000001'
select to_timestamp(timeval/1000), period, name, ACTIVE from PolledData where agent='DEVICE NAME.PROBE ID'
Get the device name and probe id from the Snapshot page URL
 select * from hardwareinformation hw inner join managedobject mo on mo.moid=hw.moid




    • Related Articles

    • Accessing OpManager PGSQL Database

      INTRODUCTION OpManager tool relies on PostgreSQL (PGSQL) database for data storage. This document describes how to access the database to run customized reports METHODS OF ACCESS The PGSQL database can be accessed locally (or by using SSH session) ...
    • Re-Index OpManager POSTGRes Database

      Query to check table size Log into the server GUI and go to the database lookup page "Support>DB Query". Execute the following commands and export the results. SELECT relname as "Table",pg_size_pretty(pg_total_relation_size(relid)) As "Total Size", ...
    • Opmanager is attempting to contact Zoho Networks and SMTP

      Introduction A customer noted that the OpManager Probe server was attempting to send data to Manage Engine which was in violation of the Firewall rules that they had on their IP network. Settings that may need to be changed to stop automated data ...
    • OpManager Trap Processor Config

      OpManager Trap Processor Config Trap processor can be edited to display a number of labels and information based on the markup language and variables (VarBinds) https://pitstop.manageengine.com/portal/kb/articles/how-to-configure-trap-message Changes ...
    • Configuring configlets in OpManager NCM

      Manage Engine has written instruction on using and creating configlets. The link in this KB may be changed if Manage Engine update it, but for now it is a source for other NCM info as well ...