Dell Vizioncore Manual de usuario Pagina 495

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 531
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 494
Using the Query Language 495
Using the Query Language FAQ
{return false;}
Advanced scripting example
In most cases, you use the
scope variable as a parameter for the functions
alarmCount, descendents, and getContainedObjects. However, there may be a
situation in which you need to create a condition or expression that uses one of these
functions but want the function to be performed on an object outside of the rule or
derived metric scope.
For example, if you wanted to compare the alarm count for objects within the scope of a
rule with the alarm count for a specific server that is not within this scope, you could
specify a condition using the following syntax:
alarmCount(scope) > alarmCount(#!CatalystServer where name =
"Server_IP:1099"#.getTopologyObjects()[0])
Where Server_IP is the IP address of the server. For example:
alarmCount(scope) > alarmCount(#!CatalystServer where name =
"10.4.112.155:1099"#.getTopologyObjects()[0])
Note In the example shown above, the exclamation point ‘!’ implies that the argument passed to
the alarmCount function is a topology object property and not a metric.
Using the Query Language FAQ
This section provides answers to the following FAQs:
•“How do I reference a topology object property in an expression?” on page 495
•“How do I export metrics from the command line?” on page 496
How do I reference a topology object property in an expression?
If the rule is scoped to the topology object that has that property, you can reference the
property using the
scope variable. This variable contains a reference to the topology
object against which the expression runs.
For example, you are interested in the property
filesystemName, you can use the
following in an expression to obtain the property value:
"File system " + scope.get("filesystemName") + " is now full"
Vista de pagina 494
1 2 ... 490 491 492 493 494 495 496 497 498 499 500 ... 530 531

Comentarios a estos manuales

Sin comentarios