| 1 |
= Monitoring |
| 2 |
|
| 3 |
Any good systems administrator will want to know how well |
| 4 |
their systems are operating, both to catch issues before they |
| 5 |
become a serious problem, or for long term analysis. |
| 6 |
The term "monitoring" can encompass all kinds of watching how the |
| 7 |
system is working, from generating and watching logs, gathering |
| 8 |
statistics or ensuring that the service daemon is still running |
| 9 |
and serving requests. |
| 10 |
|
| 11 |
We break the different types of monitoring down into the following |
| 12 |
sections. |
| 13 |
|
| 14 |
== Service checking |
| 15 |
|
| 16 |
Checking the running service can include the following: |
| 17 |
|
| 18 |
* Ensuring the daemon is still running, i.e. process monitoring |
| 19 |
* Sending regular RADIUS authentication or accounting requests and checking they are correctly responded to |
| 20 |
* Sending Status-Server RADIUS requests |
| 21 |
|
| 22 |
Within a proxy environment FreeRADIUS needs to know if upstream |
| 23 |
proxies are available. It can do this itself using the latter two |
| 24 |
options above. |
| 25 |
|
| 26 |
== Logging |
| 27 |
|
| 28 |
System logs are often the most critical part of a RADIUS system. |
| 29 |
They are necessary for the administrator to know who has logged in |
| 30 |
and when, for debugging purposes such as when an end user cannot |
| 31 |
connect, and often for regulatory or compliance purposes. |
| 32 |
|
| 33 |
RADIUS server logs are also often used as a basic form of |
| 34 |
recording accounting requests, which are in and of themselves a |
| 35 |
form of logging by the NAS. Getting correct logging systems |
| 36 |
operational is key to running an efficient and easy to maintain |
| 37 |
RADIUS server. |
| 38 |
|
| 39 |
FreeRADIUS has many options for being able to generate and store |
| 40 |
logs, including the following: |
| 41 |
|
| 42 |
* Main daemon logging, configured in `radiusd.conf` |
| 43 |
* Line-based text logging, using `rlm_linelog` |
| 44 |
* Detailed RADIUS packet logs, using `rlm_detail` |
| 45 |
|
| 46 |
As well as recording direct to disk, the above can be sent via a |
| 47 |
local syslog server, which opens up many opportunities for central |
| 48 |
logging. |
| 49 |
|
| 50 |
It is possible to integrate FreeRADIUS into other more complicated |
| 51 |
logging systems, some options may include: |
| 52 |
|
| 53 |
* To CSV files, for example via `rlm_linelog` |
| 54 |
* Writing entries to an SQL database using `rlm_sql` |
| 55 |
* Into a log management system such as Elasticsearch or Graylog |
| 56 |
|
| 57 |
|
| 58 |
== Statistics gathering |
| 59 |
|
| 60 |
It is often useful to collect statistics from a running RADIUS |
| 61 |
server. These are often plotted on graphs to show current load or |
| 62 |
for trend analysis, as well as an indication of system operation. |
| 63 |
|
| 64 |
Statistics are usually gathered in two ways: |
| 65 |
|
| 66 |
* FreeRADIUS xref:monitoring/statistics.adoc[internal statistics] |
| 67 |
* Analysing logs with some external tool |