Line object - relative positioning against a Shape object?

nagios
#1

(In Nagios XI 5.6.6)

When I create a Line object for a service, I can set the relative positioning of the end of it against a Host object. However, I cannot do the same for a Shape object. Thus, if I move the Shape object, the end of the line does not move with it.

Is there a technical reason why you cannot set to relative position of an end of a Line object against a Shape object? I expect to be able to to this against any object on the map.

#2

At least by editing the coordinates of the object (shape, line, …) in the map file directly and using the object_id of the object you want to refer to you should be able to get the result you want:

define host {
   object_id=12345
   host_name=yourHost
   x=50
   y=100
}

define shape {
object_id=54321
icon=demo-wan-cloud.png
x=12345%-10
y=12345%+20
}

%+/-offset might be used to move the object

1 Like
#3

Hi,

Thank you so much for the tip!

I looked at the Modify Object window and saw just x and y coordinates - so I was wondering how it would handle both ends (or for each point) of the line with just these two coordinates.

I attached a Line object to two separate Icon Host objects and looked at the x and y coordinates for that and saw what the format is:

x: 69b29b%+41,e2a46d%+9
y: 69b29b%+28,e2a46d%+14

So it was using a comma delimited format for each point of the line.

Using this format I was able to edit the coordinates so that the end point is using the ID of a Shape object. This seems to work - when I move the Shape object, line object end point moves with it.

This is really only a workaround. It is obviously ideal to allow this in the NagVis editor itself.

#4

It looks like once you have manually added the coordinate entry for the Shape object, you are then able to edit and move the endpoint in the editor and it gets saved appropriately.

So it looks like the issue is just the initial adding of the relative coordinate for a Shape object.

EDIT: I’m finding that for the above to work, you need to come out of and go back in to the NagVis map.

#5

I have opened up a ticket to report this issue: