wiki:Cnbp2019/Agenda/LibreNMSAlertrules

Version 1 (modified by admin, 5 years ago) ( diff )

--

Alert rules- Practicals

  1. Verify whether pc1 is down or up
  2. Check whether pc6 memory usage > 50%
  3. Find the devices where the CPU usage >=90

Note : Configure to send email in above scenarios

Answers

1.

SELECT * FROM devices WHERE (devices.device_id = ?) AND (devices.disabled = 0 && devices.ignore = 0) = 1 AND devices.status = 1

2.

SELECT * FROM devices,mempools WHERE (devices.device_id = ? AND devices.device_id = mempools.device_id) AND (devices.status = 1 
&& (devices.disabled = 0 && devices.ignore = 0)) = 1 AND mempools.mempool_perc >= 90 AND mempools.mempool_descr REGEXP "Virtual.*"

3.

SELECT * FROM devices,processors WHERE (devices.device_id = ? AND devices.device_id = processors.device_id) AND 
(devices.status = 1 && (devices.disabled = 0 && devices.ignore = 0)) = 1 AND processors.processor_usage >= 90

Attachments (3)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.