Phoebus alarm server

services.phoebus-alarm-server.enable boolean[source]

Whether to enable the Phoebus Alarm server

By default this option will also enable the phoebus-alarm-logger service. Set services.phoebus-alarm-logger.enable to false to disable it.

Default value
false
Example
true
services.phoebus-alarm-server.openFirewall boolean[source]

Open the firewall for all Phoebus Alarm related services.

This uses the port numbers configured in each related NixOS module.

Included services:

  • Phoebus Alarm Logger (if not disabled)

Warning

This opens the firewall on all network interfaces.

Default value
false
services.phoebus-alarm-server.path list of (package or string)[source]

Extra packages to add to the PATH of the phoebus-alarm-server.service systemd unit.

These packages may be used as commands configured in individual alarms.

Default value
[ ]
Example
[
  (pkgs.writeShellApplication {
    # Name of the command
    name = "phoebus-alarm-send-alert";
    # Make your script depend on the 'curl' package
    runtimeInputs = [ pkgs.curl ];
    # Content of the script
    text = ''
      # If "*" is given as argument in the configuration,
      # the first argument is the PV name
      ALARM_PV="$1"
      # and the second argument is the alarm severity
      ALARM_SEVERITY="$2"

      curl -sSfL "https://my-server.example.com/api/alarm/webhook" \
        -X POST \
        --header "Content-Type: application/json" \
        -d '{"pv": "'$ALARM_PV'", "severity": "'$ALARM_SEVERITY'"}'
    '';
  })
]
services.phoebus-alarm-server.settings open submodule of attribute set of (string, package, bool, int or float)[source]

Configuration for the Phoebus Alarm Server.

These options will be put into a .properties file.

Note that options containing a “.” must be quoted.

Default value
{ }
services.phoebus-alarm-server.settings."org.phoebus.applications.alarm/command_directory" string[source]

Directory used for executing commands.

May use Java system properties like this: $(prop_name).

Default value
"/var/lib/phoebus-alarm-server"
services.phoebus-alarm-server.settings."org.phoebus.applications.alarm/config_names" list of string[source]

Names of selectable alarm configurations.

Will be used as the name for the Kafka topic.

Default value
[
  "Accelerator"
]
services.phoebus-alarm-server.settings."org.phoebus.applications.alarm/server" string[source]

Kafka server host:port

services.phoebus-alarm-server.settings."org.phoebus.email/from" string[source]

Default address to be used for the email field From.

If left empty, then the last used from address is used.

Default value
""
services.phoebus-alarm-server.settings."org.phoebus.email/mailhost" string[source]

The SMTP server host.

If set to "DISABLE" (the default), email support is disabled.

Default value
"DISABLE"
services.phoebus-alarm-server.settings."org.phoebus.email/mailport" 16 bit unsigned integer; between 0 and 65535 (both inclusive)[source]

The SMTP server port.

Default value
25
services.phoebus-alarm-server.settings."org.phoebus.email/password" string[source]

Password for authenticating to the SMTP server.

Note

The password will be put in plaintext, in the world-readable /nix/store.

Default value
""
services.phoebus-alarm-server.settings."org.phoebus.email/username" string[source]

Username for authenticating to the SMTP server.

Default value
""
services.phoebus-alarm-server.settings."org.phoebus.pv.ca/addr_list" list of string[source]

Channel Access address list.

Use lib.mkForce to override values from environment.epics.ca_addr_list.

Default value
if config.environment.epics.enable
then config.environment.epics.ca_addr_list
else [];
services.phoebus-alarm-server.settings."org.phoebus.pv.ca/auto_addr_list" boolean[source]

Derive the CA address list from the available network interfaces.

Use lib.mkForce to override values from environment.epics.ca_auto_addr_list.

Default value
if config.environment.epics.enable
then config.environment.epics.ca_auto_addr_list
else [];