3 # Create a template mapping for RADIUS data
7 # This should be run on an elasticsearch node. Alternatively,
8 # adjust the curl URI below.
10 # The template will be called "radius", and will apply to all
11 # indices prefixed with "radius-" that contain data type "detail".
12 # As not all RADIUS attributes are known to begin with it has the
13 # following starting point that can be modified to suit the local
16 # Acct-Input- or Acct-Output- attributes are numbers;
17 # Acct-Session-Time is a number;
18 # Everything else is a string.
20 # Additionally, the supplied logstash config will try and extract
21 # MAC addresses, IP addresses and ports from the data. These are
22 # stored with suffixes on the respective attribute. For example,
25 # Called-Station-Id := "10.0.4.6[4500]"
27 # will be broken down into the following fields in elasticsearch:
29 # Called-Station-Id = "10.0.4.6[4500]"
30 # Called-Station-Id_ip = "10.0.4.6"
31 # Called-Station-Id_port = "4500"
33 # This mapping ensures that these have an appropriate data type.
36 curl -XPUT '127.0.0.1:9200/_template/radius' -d '
38 "template":"radius-*",
44 "@timestamp": { "format": "dateOptionalTime", "type": "date" },
45 "@version": { "type" : "string" },
46 "message": { "type" : "string" },
47 "Acct-Session-Time": { "type" : "long", "doc_values": true },
48 "offset": { "type" : "long", "doc_values": true }
51 "dynamic_templates": [
53 { "acct_io_numbers": {
54 "match_pattern": "regex",
55 "match": "^Acct-(Input|Output)-.*$",
73 "path_match": "*_port",
82 "path_match": "*_long",
90 { "no_analyze_strings": {
94 "index": "not_analyzed",