Skip to content

Instantly share code, notes, and snippets.

@SemanticallyNull
Last active February 5, 2024 00:29
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save SemanticallyNull/97ee68095d07697416be3a9840882ceb to your computer and use it in GitHub Desktop.
Save SemanticallyNull/97ee68095d07697416be3a9840882ceb to your computer and use it in GitHub Desktop.
Syslog Facility Priority Matrix

The Priority value is calculated by first multiplying the Facility number by 8 and then adding the numerical value of the Severity. For example, a kernel message (Facility=0) with a Severity of Emergency (Severity=0) would have a Priority value of 0. Also, a "local use 4" message (Facility=20) with a Severity of Notice (Severity=5) would have a Priority value of 165. In the PRI of a syslog message, these values would be placed between the angle brackets as <0> and <165> respectively. The only time a value of "0" follows the "<" is for the Priority value of "0". Otherwise, leading "0"s MUST NOT be used. – RFC 5424, Section 6.2.1

Severity ➡️ 0 1 2 3 4 5 6 7
Facilities ⤵️
kernel (0) 0 1 2 3 4 5 6 7
user (1) 8 9 10 11 12 13 14 15
mail (2) 16 17 18 19 20 21 22 23
system (3) 24 25 26 27 28 29 30 31
security (4) 32 33 34 35 36 37 38 39
syslog (5) 40 41 42 43 44 45 46 47
lpd (6) 48 49 50 51 52 53 54 55
nntp (7) 56 57 58 59 60 61 62 63
uucp (8) 64 65 66 67 68 69 70 71
time (9) 72 73 74 75 76 77 78 79
security (10) 80 81 82 83 84 85 86 87
ftpd (11) 88 89 90 91 92 93 94 95
ntpd (12) 96 97 98 99 100 101 102 103
logaudit (13) 104 105 106 107 108 109 110 111
logalert (14) 112 113 114 115 116 117 118 119
clock (15) 120 121 122 123 124 125 126 127
local0 (16) 128 129 130 131 132 133 134 135
local1 (17) 136 137 138 139 140 141 142 143
local2 (18) 144 145 146 147 148 149 150 151
local3 (19) 152 153 154 155 156 157 158 159
local4 (20) 160 161 162 163 164 165 166 167
local5 (21) 168 169 170 171 172 173 174 175
local6 (22) 176 177 178 179 180 181 182 183
local7 (23) 184 185 186 187 188 189 190 191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment