COUNT: Count of group members
Use the Count of group members formula function in a query or situation to count the number of returned rows, which can be filtered by an AND expression.
COUNT in a query to the monitoring server works differently
than it does in a situation: It counts the column specified within
the group referenced (Advanced button, Group By tab), and displays
the result in the count column.
Note: When using COUNT in an AND expression, it must be the last function
in the expression.
- Query example
- This function counts the number of processes. GROUP BY is Server
Name, and the number of processes counted for each system appears
in the ID Process column. Example as it would be written in an SQL
statement:
COUNT(ID_Process)
- Situation examples
- Examples as they appear in Show Formula:
- The comparison is true when more than 10 rows have been
counted.
COUNT(Timestamp) > 10
- This formula first filters the rows for those with the notepad process, then counts the returned
rows by referencing the Timestamp attribute. The attribute used for the count does not matter,
because the COUNT function is simply counting the number of rows where this attribute appears. When
the count exceeds four, the comparison is
true.
(Process Name) == notepad AND COUNT(Timestamp) > 4
- The next formula counts the processes that have been running for more than an hour. When at
least five processes have been counted, the comparison is
true.
(Elapsed Time (Seconds) >= 3600)) AND COUNT(Timestamp) >= 5
- The comparison is true when more than 10 rows have been
counted.