OCSF severity levels.
Maps human-readable severity names to their OCSF 1.8 numeric
identifiers. Used by event builders to resolve the :severity
keyword into the severity_id field.
See the OCSF severity_id definition.
Values
| Name | ID |
|---|---|
:Unknown | 0 |
:Informational | 1 |
:Low | 2 |
:Medium | 3 |
:High | 4 |
:Critical | 5 |
:Fatal | 6 |
:Other | 99 |
See OCSF.Status for event outcome status.
Summary
Functions
Return values formatted for Ecto.Enum.
Return the name atom for the given numeric identifier.
Return the numeric identifier for the given name atom.
Return true if the given name or identifier is valid.
Return all values as a keyword list.
Functions
@spec ecto_values() :: keyword()
Return values formatted for Ecto.Enum.
Examples
iex> OCSF.Severity.ecto_values()
[Unknown: 0, Informational: 1, Low: 2, Medium: 3, High: 4, Critical: 5, Fatal: 6, Other: 99]
Return the name atom for the given numeric identifier.
Examples
iex> OCSF.Severity.name(1)
:Informational
iex> OCSF.Severity.name(42)
nil
Return the numeric identifier for the given name atom.
Examples
iex> OCSF.Severity.uid(:Informational)
1
iex> OCSF.Severity.uid(:NonExistent)
nil
Return true if the given name or identifier is valid.
Examples
iex> OCSF.Severity.valid?(:Informational)
true
iex> OCSF.Severity.valid?(1)
true
iex> OCSF.Severity.valid?(:NonExistent)
false
Return all values as a keyword list.
Examples
iex> OCSF.Severity.values()
[Unknown: 0, Informational: 1, Low: 2, Medium: 3, High: 4, Critical: 5, Fatal: 6, Other: 99]