Repository: brooklyn-docs
Updated Branches:
  refs/heads/master 3dd1400c2 -> 4f8660575


Brooklyn.initializers example with sensor from windows command


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/65bc77b6
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/65bc77b6
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/65bc77b6

Branch: refs/heads/master
Commit: 65bc77b6a97bd036706476483f1d6b67b6064439
Parents: 3dd1400
Author: Valentin Aitken <bos...@gmail.com>
Authored: Mon Mar 13 18:54:45 2017 +0200
Committer: Valentin Aitken <bos...@gmail.com>
Committed: Thu Mar 16 11:49:41 2017 +0200

----------------------------------------------------------------------
 guide/yaml/custom-entities.md | 15 +++++++++++++++
 guide/yaml/yaml-reference.md  |  7 ++++---
 2 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/65bc77b6/guide/yaml/custom-entities.md
----------------------------------------------------------------------
diff --git a/guide/yaml/custom-entities.md b/guide/yaml/custom-entities.md
index e30f4fb..88d62ff 100644
--- a/guide/yaml/custom-entities.md
+++ b/guide/yaml/custom-entities.md
@@ -243,6 +243,21 @@ so that the `$message` we passed above gets logged and 
reported back:
           period: 1s
           command: tail -1 server-input
 
+##### Windows Command Sensor
+
+Like the blueprint above, the following example also uses 
brooklyn.initializers to define sensors on the entity,
+this time however it is a windows VM and uses `WinRmCommandSensor`.
+
+    - type: org.apache.brooklyn.entity.software.base.VanillaWindowsProcess
+      brooklyn.config:
+        launch.command: echo launching
+        checkRunning.command: echo running
+      brooklyn.initializers:
+      - type: org.apache.brooklyn.core.sensor.windows.WinRmCommandSensor
+        brooklyn.config:
+          name: ip.config
+          period: 60s
+          command: hostname
 
 #### Summary
 

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/65bc77b6/guide/yaml/yaml-reference.md
----------------------------------------------------------------------
diff --git a/guide/yaml/yaml-reference.md b/guide/yaml/yaml-reference.md
index b908b19..fd63d34 100644
--- a/guide/yaml/yaml-reference.md
+++ b/guide/yaml/yaml-reference.md
@@ -58,9 +58,10 @@ the entity being defined, with these being the most common:
     and optionally a `period`, to create a sensor feed which populates the 
sensor with
     the given name by running the given command (on an entity which as an 
ssh-able machine)
 
-  * `org.apache.brooklyn.core.sensor.windows.WinRmCommandSensor`: For command 
supplied via WinRm. Takes a `name` and `command`,
-    and optionally a `period`, to create a sensor feed which populates the 
sensor with
-    the given name by running the given command (on an entity which as an 
winrm-able machine)
+  * `org.apache.brooklyn.core.sensor.windows.WinRmCommandSensor`: For a 
command supplied via WinRm. Takes a `name`, `command`,
+    and optionally a `period` and `executionDir`, to create a sensor feed 
which populates the sensor with
+    the given name by running the given command (on an entity which as an 
winrm-able machine).<br/>
+    _`"~"` will use the default execution directory for the WinRm session 
which is usually `%USERPROFILE%`_
 
 * `brooklyn.parameters`: documents a list of typed parameters the entity 
accepts. If none
   are specified the config keys declared in the entity's class are used 
(including the

Reply via email to