Created 07-22-2020 06:33 AM
Hi,
Could you let me know how to use "NOT" related conditions in Cloudera Manager triggers.
Ex: If mount point "/test" is NOT found on host, then it should alert.
Created 07-23-2020 04:09 AM
You can edit the expression manually to include the NOT operator. Check the below example which uses NOT operator for a trigger.
A trigger expression takes the form:
IF (CONDITIONS) DO HEALTH_ACTION
A condition is any valid tsquery statement with below syntax.
SELECT [metric expression]WHERE [predicate]
Mount point is an attribute which can be used in filter conditions but not metric expression. Hence, I believe it would not be possible to create a trigger on mount point scans.
Refer below document which lists the supported metrics:
Example:
IF (SELECT total_xceivers_across_datanodes WHERE serviceName=$SERVICENAME AND last(total_xceivers_across_datanodes) != 0 AND entityName = "HDFS-1:ns1" AND category = "SERVICE") DO health:concerning
Hope this helps,
Paras
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Created 07-23-2020 08:11 AM
Hi Paras,
Thanks for the reply.
In that case, is there any other way to get an alert from Cloudera manager if a mount is missing in an host. ?
Created 07-24-2020 06:20 AM
Ideally, for a missing mounts in the cluster you would automatically get alerts for services if any hadoop service directories cannot be accessed which are mapped to the mountpoint. They can be generic though like "no such file or directory" or "file not found" errors.
If you are looking for specific mountpoint availability, you should consider using script to scan for mountpoints in the cluster hosts and can send email alerts using SMTP from the host instead of Cloudera Manager.
Hope this helps,
Paras
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.