You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2013/07/29 14:51:48 UTC
[jira] [Created] (SLING-2983) Scripted expressions for Health Check
rules
Bertrand Delacretaz created SLING-2983:
------------------------------------------
Summary: Scripted expressions for Health Check rules
Key: SLING-2983
URL: https://issues.apache.org/jira/browse/SLING-2983
Project: Sling
Issue Type: Bug
Components: Extensions
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz
Priority: Minor
I have implemented scripted expressions for Health Check rules, that can use any Sling scripting language and must return true for the Rule to be successful.
Here's two examples from [1]:
scripted-ecma.json:
{
"sling:resourceType" : "sling/healthcheck/rules",
"namespace": "script",
"ruleName": "Test javascript (ecma) rule",
"qualifier": "ecma",
"expression": "Math.round(2.6) == 3",
"tags" : ["script","javascript"],
"jcr:primaryType": "nt:unstructured"
}
scripted-groovy.json:
{
"sling:resourceType" : "sling/healthcheck/rules",
"namespace": "script",
"ruleName": "Test Groovy rule",
"qualifier": "groovy",
"expression": "someList = [1776, -1, 33, 99, 0, 928734928763] ; someList[2] == 33",
"tags" : ["script","groovy"],
"jcr:primaryType": "nt:unstructured"
}
[1] https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/healthcheck/sling-demo/src/main/resources/SLING-CONTENT/apps/hc/demo
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira