3 ## trigger.conf -- Events in the server can trigger a hook to be executed.
8 # The triggers are named as "type.subtype.value". These names refer
9 # to subsections and then configuration items in the "trigger"
10 # section below. When an event occurs, the trigger is executed. The
11 # trigger is simply a program that is run, with optional arguments.
13 # The server does not wait when a trigger is executed. It is simply
14 # a "one-shot" event that is sent.
16 # The trigger names should be self-explanatory.
22 # For now, this is only for SNMP traps.
24 # They are enabled by uncommenting (or adding) "$INCLUDE trigger.conf"
25 # in the main "radiusd.conf" file.
27 # The traps *REQUIRE* that the files in the "mibs" directory be copied
28 # to the global mibs directory, usually /usr/share/snmp/mibs/.
29 # If this is not done, the "snmptrap" program has no idea what information
30 # to send, and will not work. The MIB installation is *NOT* done as
31 # part of the default installation, so that step *MUST* be done manually.
33 # The global MIB directory can be found by running the following command:
35 # snmptranslate -Dinit_mib .1.3 2>&1 | grep MIBDIR | sed "s/' .*//;s/.* '//;s/.*://"
39 # snmptranslate -Dinit_mib .1.3 2>&1 | grep MIBDIR
41 # If you have copied the MIBs to that directory, you can test the
42 # FreeRADIUS MIBs by running the following command:
44 # snmptranslate -m +FREERADIUS-NOTIFICATION-MIB -IR -On serverStart
46 # It should print out:
48 # .1.3.6.1.4.1.11344.4.1.1
50 # As always, run the server in debugging mode after enabling the
51 # traps. You will see the "snmptrap" command being run, and it will
52 # print out any errors or issues that it encounters. Those need to
53 # be fixed before running the server in daemon mode.
55 # We also suggest running in debugging mode as the "radiusd" user, if
56 # you have "user/group" set in radiusd.conf. The "snmptrap" program
57 # may behave differently when run as "root" or as the "radiusd" user.
61 # Configuration for SNMP traps / notifications
63 # To disable traps, edit "radiusd.conf", and delete the line
64 # which says "$INCUDE trigger.conf"
68 # Absolute path for the "snmptrap" command, and
69 # default command-line arguments.
71 # You can disable traps by changing the command to
74 cmd = "/usr/bin/snmptrap -v2c"
82 # Agent configuration.
84 agent = "localhost ''"
89 # The "snmptrap" configuration defines the full command used to run the traps.
91 # This entry should not be edited. Instead, edit the "trap" section above.
93 snmptrap = "${snmp.trap.cmd} -c ${snmp.trap.community} ${snmp.trap.agent} FREERADIUS-NOTIFICATION-MIB"
96 # The individual triggers are defined here. You can disable one by
97 # deleting it, or by commenting it out. You can disable an entire
98 # section of traps by deleting the section.
100 # The entries below should not be edited. For example, the double colons
101 # *must* immediately follow the ${snmptrap} reference. Adding a space
102 # before the double colons will break all SNMP traps.
104 # However... the traps are just programs which are run when
105 # particular events occur. If you want to replace a trap with
106 # another program, you can. Just edit the definitions below, so that
107 # they run a program of your choice.
109 # For example, you can leverage the "start/stop" triggers to run a
110 # program when the server starts, or when it stops. But that will
111 # prevent the start/stop SNMP traps from working, of course.
115 # Events in the server core
118 # the server has just started
119 start = "${snmptrap}::serverStart"
121 # the server is about to stop
122 stop = "${snmptrap}::serverStop"
124 # The "max_requests" condition has been reached.
125 # This will trigger only once per 60 seconds.
126 max_requests = "${snmptrap}::serverMaxRequests"
128 # For events related to clients
130 # Added a new dynamic client
131 add = "/path/to/file %{Packet-Src-IP-Address}"
133 # There is no event for when dynamic clients expire
136 # Events related to signals received.
139 hup = "${snmptrap}::signalHup"
142 term = "${snmptrap}::signalTerm"
146 # When a home server changes state.
147 # These traps are edge triggered.
149 # common arguments: IP, port, identifier
150 args = "radiusAuthServerAddress a %{proxy-request:Packet-Dst-IP-Address} radiusAuthClientServerPortNumber i %{proxy-request:Packet-Dst-Port} radiusAuthServIdent s '%{home_server:instance}'"
152 # The home server has been marked "alive"
153 alive = "${snmptrap}::homeServerAlive ${args}"
155 # The home server has been marked "zombie"
156 zombie = "${snmptrap}::homeServerZombie ${args}"
158 # The home server has been marked "dead"
159 dead = "${snmptrap}::homeServerDead ${args}"
162 # When a pool of home servers changes state.
165 args = "radiusdConfigName s %{home_server:instance}"
167 # It has reverted to "normal" mode, where at least one
168 # home server is alive.
169 normal = "${snmptrap}::homeServerPoolNormal ${args}"
171 # It is in "fallback" mode, with all home servers "dead"
172 fallback = "${snmptrap}::homeServerPoolFallback ${args}"
175 # Triggers for specific modules. These are NOT in the module
176 # configuration because they are global to all instances of the
177 # module. You can have module-specific triggers, by placing a
178 # "trigger" subsection in the module configuration.
183 args = "radiusdModuleName s 'sql' radiusdModuleInstance s ''"
185 # A new connection to the DB has been opened
186 open = "${snmptrap}::serverModuleConnectionUp ${args}"
188 # A connection to the DB has been closed
189 close = "${snmptrap}::serverModuleConnectionDown ${args}"
190 # There are no DB handles available.
191 none = "${snmptrap}::serverModuleConnectionNone ${args}"
197 # The complete list of triggers as generated from the source code is below.
199 # These are the ONLY traps which are generated. You CANNOT add new traps
200 # by defining them in one of the sections above. New traps can be created
201 # only by edited both the source code to the server, *and* the MIBs.
202 # If you are not an expert in C and SNMP, then adding new traps will be
203 # difficult to create.
208 # home_server_pool.fallback
209 # home_server_pool.normal
214 # server.max_requests