You are here: Domain Administration > Managing Domain Operations > Defining Alarms > Creating Alarms Using NuoDB Manager

Creating Alarms Using NuoDB Manager

Creating an alarm in NuoDB Manager is done with the create alarmDefinition command. This can be done interactively at the nuodbmgr prompt or using the --command command-line syntax. See NuoDB Managercreate alarmDefinition for exact syntax.

Creating Domain Event Alarms

We can create the same Node Left alarm using NuoDB Manager. This is done with create alarmDefinition event. We can do this interactively as in the following example:

nuodb [domain] > create alarmDefinition event
Name: My Node Left
Description (optional): 
EventType [NodeJoined, NodeLeft, NodeFailed, PeerJoined, PeerLeft, DatabaseActive, 
   DatabaseInactive, DatabaseStarted, DatabaseStopped, EnforcerFailed, 
   EnforcerNodeBackoff, EnforcerNodeBackoffMaxRetried]: NodeLeft
Dimension ([Domain, Database, Host, Node]: Domain
EntityFilter (optional): 
Severity [Severe, Warning, Info, Debug] (optional): Debug
Action [LogOnly, NotifyEvent] (optional): NotifyEvent

Created Alarm Definition [My Node Left]: type=NodeLeft dimension=Domain entity=*(Debug)

Or on the command line with the syntax:

$ nuodbmgr ... --command "create alarmDefinition event name 'My Node Left' 
      eventType NodeLeft dimension Domain"

Creating Statistical Alarms

We can create the same statistical alarm using NuoDB Manager. This is done with create alarmDefinition metric. We can do this interactively as in the following example:

nuodb [domain] > create alarmDefinition metric
Name: avg-cpu-60
Description (optional):
MetricName: OS-cpuTotalTimePercent
Dimension ([Domain, Database, Host, Node]: Domain
EntityFilter (optional):
AggregationFunction [None, Sum, Average]: Average
Operator [EQ, GT, GE, LT, LE, NE]: GE
Threshold: 60
Breach Duration (min): 10
Severity [Severe, Warning, Info, Debug] (optional): Debug
Action [LogOnly, NotifyEvent] (optional): NotifyEvent

Created Alarm Definition: avg-cpu-60 Domain:*:OS-cpuTotalTimePercent(Average) 
      GE 60.00 600s (Debug, Reset)

Or on the command line with the syntax:

$ nuodbmgr ... --command "create alarmDefinition metric name avg-cpu-60 metricName 
      OS-cpuTotalTimePercent threshold 60 operator GE aggrFunc Average 
      dimension Domain breachDuration 10"