xref: /openbmc/phosphor-dbus-monitor/src/example/example.yaml (revision b97bfff73e44e53571f8a00b80ec947496930d7b)
1# Example PDM configuration file.
2
3- name: example path group
4  description: >
5    'A path group is a named collection of DBus object
6    paths and associated metadata.  These collections
7    serve only to be referenced by other configuration
8    directives.
9
10    The metadata element has different uses depending
11    on the referencing directive.
12
13    Within a single configuration file path group names
14    must be unique.  The same name can appear in multiple
15    configuration files; however, the referencing directive
16    will only search for the group in the same configuration
17    file.'
18  class: group
19  group: path
20  members:
21    - meta: path
22      path: /xyz/openbmc_project/testing/inst1
23    - meta: path
24      path: /xyz/openbmc_project/testing/inst2
25    - meta: path
26      path: /xyz/openbmc_project/testing/inst3
27    - meta: path
28      path: /xyz/openbmc_project/testing/inst4
29
30- name: example property group
31  description: >
32    'Like path groups, a property group is a named collection
33    of DBus property names and associated metadata.
34
35    Properties in a group must all have the same DBus type signature
36    and must be explicitly declared.'
37  class: group
38  group: property
39  type: uint32
40  members:
41    - interface: xyz.openbmc_project.Sensor.Value
42      meta: property
43      property: ValueA
44    - interface: xyz.openbmc_project.Sensor.Value
45      meta: property
46      property: ValueB
47
48- name: example property watch
49  description: >
50    'A property watch instructs PDM to maintain a cache of the state
51    of the specified properties on the specified DBus objects.'
52  class: watch
53  watch: property
54  paths: example path group
55  properties: example property group
56
57- name: example journal callback
58  description: >
59    'Callbacks are actions PDM should take when instructed to do so.
60
61    Some callback types refer to a group of paths and group of properties
62    in a similar fashion as the property watch directive.
63
64    The journal callback logs the specified message to the systemd journal
65    with the specified severity.
66
67    Additionally, the journal callback will add to the journal key value
68    pair metadata for each property in the specified property group with
69    the key being the property element metadata and the value being the
70    property value.'
71  class: callback
72  callback: journal
73  paths: example path group
74  properties: example property group
75  severity: INFO
76  message: Hello world from PDM!
77
78- name: example callback group
79  description: >
80    'Callbacks groups are simply named collections of other callbacks.
81    Configuration file directives can only refer to a single callback.
82    Through use of a group, these configuration file directives can
83    refer to more than one callback.
84
85    For example for a given event, one may wish to trace multiple
86    messages to the systemd journal.  The journal callback does not
87    support tracing multiple messages.  To do that, define a callback
88    group composed of multiple journal callbacks.
89
90    This example callback group only has one member.  To add more, add
91    additional callbacks to the members element.'
92  class: callback
93  callback: group
94  members:
95    - example journal callback
96
97- name: example count condition
98  description: >
99    'Conditions or conditional callbacks apply a test prior to invoking
100    the callback function.
101
102    All conditional callbacks must specify the callback to issue if
103    the condition evaulates.
104
105    The count condition applies the op comparison operator to the value of each
106    property in the specified groups.  It then counts the number of properties
107    that pass the comparison, and applies another comparison on the result
108    against the specified bound.
109
110    For example, a callback that requires at least three temperature sensors
111    in the group to be higher than 115 degrees might use a count condition
112    with an op of >, a count op of >=, a bound of 115, and a countbound of 3.'
113
114  class: condition
115  condition: count
116  paths: example path group
117  properties: example property group
118  callback: example callback group
119  countop: '>='
120  countbound: 3
121  op: '>='
122  bound: 115
123