How to Search for All Log File Monitors configured within Spectrum?
search cancel

How to Search for All Log File Monitors configured within Spectrum?

book

Article ID: 258404

calendar_today

Updated On:

Products

DX NetOps CA Spectrum

Issue/Introduction

How to Search for All Log File Monitors configured within Spectrum?

Environment

Release - All Supported Releases

Component - SPCCSS - SpectroSERVER Core

Resolution

Log monitors are stored in a table attribute on a device model so this cannot be displayed within OneClick.
 
This can be done via RESTAPI. You can use the following URL to get the information.

http(s)://ONECLICKHOSTNAME:PORT/spectrum/restful/devices?attr=0x1006e&attr=0x1160fbd

If the device has a logmonitor you will see something like below showing the name of the device and instance and the file:

<model mh="0x61560f">
<attribute id="0x1006e">
device1
</attribute>
<attribute-list id="0x1160fbd">
<instance oid="11" value="/usr/Spectrum/tomcat/logs/catalina.out"/>
<instance oid="12" value="/usr/Spectrum/tomcat/logs/catalina.out"/>
</attribute-list>
</model>

If the device doesn't has a logmonitor you will see something like below showing:

<model mh="0x608a10">
<attribute id="0x1006e">device2</attribute>
<attribute error="NoSuchAttribute" id="0x1160fbd"/>
</model>