PM - How can I get the IP address from a device from t_device or dst_device table?
search cancel

PM - How can I get the IP address from a device from t_device or dst_device table?

book

Article ID: 212825

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration

Issue/Introduction

How can I get the IP address from a device from t_device or dst_device table? Is 'Address' the right value and how can I convert it to a readable IP address?

mysql> select ItemID,Address from t_device where DisplayName='deviceTest';
+------------+--------------------+
| ItemID    |   Address          |
+------------+--------------------+
|    395      |           ā–’ā–’
Jā–’?           |
+------------+---------------------+

Environment

Any PM release

Resolution

The element Address is indeed the right value but in order to make the IP address readable you would need to use v6_ntoa(Address), eg:

mysql> select ItemID,v6_ntoa(Address) from t_device where DisplayName='deviceTest';
+-------------+-------------------------+
| ItemID      | v6_ntoa(Address) |
+-------------+-------------------------+
|    395       | 10.xx.2xx.xx          |
+-------------+-------------------------+