Skip to content

Commit a28012f

Browse files
committed
Update docs with example outputs
1 parent f420efa commit a28012f

File tree

1 file changed

+60
-22
lines changed

1 file changed

+60
-22
lines changed

src/site/sphinx/config.rst

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -145,46 +145,84 @@ For named policy PVs, the AA plugin will first check that the named policy exist
145145
# no archiver tag so PV sent to archiver in aa.default_alias
146146
}
147147
148+
Metrics
149+
^^^^^^^
148150

149-
EPICS PV Access Server
150-
----------------------
151+
Metrics can be exposed by setting the `management.endpoints.web.exposure.include=prometheus` property.
151152

152-
ChannelFinder provides an EPICS PV Access Server to access the api through pvAccess.
153-
There are a number of options that can be set such EPICS_PVA_ADDR_LIST. To see the
154-
full list go to `PVASettings javadoc <https://javadoc.io/doc/org.phoebus/core-pva/latest/org/epics/pva/PVASettings.html>`_.
153+
.. code-block::
155154
156-
Since it is common to run ChannelFinder inside a docker container which by default does not support IPv6 you may have
157-
error messages in the logs about launching the EPICS PV Access service. If you only wish to have the EPICS Service available on
158-
IPv4 you can set the environment variable
155+
management.endpoints.web.exposure.include=prometheus, metrics, health, info
159156
160-
EPICS_PVAS_INTF_ADDR_LIST="0.0.0.0"
157+
Adding the prometheus property will expose the prometheus endpoint which can be scraped by prometheus.
161158

162-
Or to not have the EPICS PV Access Server listen, then:
159+
The default metrics exposed by specifying "metrics" are:
163160

164-
EPICS_PVAS_INTF_ADDR_LIST="0.0.0.0"
161+
.. code-block::
165162
166-
Metrics
167-
^^^^^^^
163+
cf.total.channel.count - Count of all ChannelFinder channels
164+
cf.property.count - Count of all Property Names
165+
cf.tag.count - Count of all tags
168166
169-
Metrics can be exposed by setting the `management.endpoints.web.exposure.include=prometheus` property.
167+
Tag Metrics
168+
"""""""""""
170169

171-
.. code-block::
170+
You can also set the metrics.tags to add counts of number of channels per tag. These are exposed as
171+
`cf.tag_on_channels.count{tag=tagName}`. For example
172172

173-
management.endpoints.web.exposure.include=prometheus, metrics, health, info
173+
.. code-block::
174174
175-
Adding the prometheus property will expose the prometheus endpoint which can be scraped by prometheus.
175+
metrics.tags=Accelerator, Beamline1, Beamline2, Beamline3
176176
177-
You can also set the metrics.tags to add counts of number of channels per tag. These are exposed as
178-
`cf_channel_count{tag=tagName}`
177+
Would produce metrics:
179178

180179
.. code-block::
181180
182-
metrics.tags=Accelerator, Beamline, Beamline1, Beamline2, Beamline3
181+
cf.tag_on_channels.count=109
182+
cf.tag_on_channels.count{tag=Accelerator} = 100
183+
cf.tag_on_channels.count{tag=Beamline1} = 3
184+
cf.tag_on_channels.count{tag=Beamline2} = 3
185+
cf.tag_on_channels.count{tag=Beamline3} = 3
186+
187+
Property Metrics
188+
""""""""""""""""
183189

184190
You can also set the metrics.properties to add counts of number of channels per property and value. These are exposed as
185-
`cf_propertyName_channels_count{propertyName=propertyValue}`.
191+
`cf_propertyName_channels_count{propertyName=propertyValue}`. For example:
192+
193+
194+
.. code-block::
186195
196+
metrics.properties=pvStatus:Active, Inactive; archive: default, fast, slow; archiver: aa_beamline, aa_acccelerator
197+
198+
Would produce metrics:
187199

188200
.. code-block::
189201
190-
metrics.properties=pvStatus:Active, Inactive; archive: default, fast, slow; archiver: aa_beamline, aa_acccelerator
202+
cf.pvStatus.channel.count=100
203+
cf.pvStatus.channel.count{pvStatus=Active}=50
204+
cf.pvStatus.channel.count{pvStatus=Active}=50
205+
cf.archive.channel.count=21
206+
cf.archive.channel.count{archive=default}=1
207+
cf.archive.channel.count{archive=fast}=10
208+
cf.archive.channel.count{archive=slow}=10
209+
cf.archiver.channel.count=20
210+
cf.archive.channel.count{archive=aa_beamline}=10
211+
cf.archive.channel.count{archive=aa_acccelerator}=10
212+
213+
EPICS PV Access Server
214+
----------------------
215+
216+
ChannelFinder provides an EPICS PV Access Server to access the api through pvAccess.
217+
There are a number of options that can be set such EPICS_PVA_ADDR_LIST. To see the
218+
full list go to `PVASettings javadoc <https://javadoc.io/doc/org.phoebus/core-pva/latest/org/epics/pva/PVASettings.html>`_.
219+
220+
Since it is common to run ChannelFinder inside a docker container which by default does not support IPv6 you may have
221+
error messages in the logs about launching the EPICS PV Access service. If you only wish to have the EPICS Service available on
222+
IPv4 you can set the environment variable
223+
224+
EPICS_PVAS_INTF_ADDR_LIST="0.0.0.0"
225+
226+
Or to not have the EPICS PV Access Server listen, then:
227+
228+
EPICS_PVAS_INTF_ADDR_LIST="0.0.0.0"

0 commit comments

Comments
 (0)