Cybersecurity
DevOps Cloud
IT Operations Cloud
[Issue]
My customer has many topology maps that contain map annotations. And the administrator want to manage which maps and what described, added or deleted.
I found the nms_map_view_anno contain just annotation data, but I connot find related map name. Can I get the nodegroup name with map annotation?
[Workaround]
To get the nodegroup name with map annotation, need to associate the following tables in the sql statement.
---------------------------------------------
nms_map_view_anno
nms_node_group_map_settings
nms_node_groups
---------------------------------------------
The specific sql statement is as follows, please refer to it.
select * from nms_map_view_anno a, nms_node_group_map_settings b, nms_node_groups c where a.view_info=b.id and b.node_group=c.id;
The above sql statement is to query all the data in these three tables. You can also use the following sql statement to query. In this sql statement, the first column in the query result is the nodegroup name, and the other columns are the map annotation data.
select c.name, a.* from nms_map_view_anno a, nms_node_group_map_settings b, nms_node_groups c where a.view_info=b.id and b.node_group=c.id;
[Example:]
Below is an example of get map annotation info from a specific map.
To get map annotation [This is Routers node group map] by map name [Routers], please refer to the follow sql statement.
------------------------------------------------------------------------
select c.name mapname, a.text mapannotation from nms_map_view_anno a, nms_node_group_map_settings b, nms_node_groups c where a.view_info=b.id and b.node_group=c.id and c.name='Routers';
mapname | mapannotation
---------+-------------------------------
Routers | This is Routers node group map
(1 row)
------------------------------------------------------------------------
The group name specified in the query condition is [Routers] (the group name is the map name), and the query result only outputs the map name and the map annotation of this map.