If i want to create a second graph for this service, what is the naming convention. Can i add it in to the declaration of the first graph? I have tried several combinations but cant get anything to appear
Yes, you would need a second Graph() definition for that. If you have already defined the metrics Service_Metric3 and Service_Metric4, you could define the graph with these two metrics like this:
The variable name after the graph_ doesn’t really matter. You could also number all your graphs across all your self written plugins like this: graph_1, graph_2, graph_3 and so on, but I would not recommend that.
Just give them a name which describes what is shown and of which you think it doesn’t collide with already existing names. There’s no gurantee, though. Maybe use some sort of “namespace” (graph_rzrshp_state, graph_rzrshp_more_state, …).
Thanks for the reply. That worked super by declaring another Graph instance.
Do you know of any way to reference a metric in another service in the graph declaration. I want to compare two metrics side by side but they are in different services under the same host. The following wont work as is
graph_Nav_light_state_compare = Bidirectional(
name="graph_Nav_light_compare",
title=Title("Light status Vs Voltage"),
lower=Graph(
name="lower",
title=Title("Voltage"),
compound_lines=["Station_Battery_1"] #this metric is in another service
),
upper=Graph(
name="upper",
title=Title("Navigational light"),
compound_lines=["Nav_light_ON"]
)
)