2 The jsoninfo plugin aims to deliver all of the information about the
3 runtime status and configuration of olsrd. You can request specific
4 chunks of information, or overviews of runtime or startup
5 configuration, or all of the information in one report. Additionally,
6 the jsoninfo plugin will dump the current olsrd config in the
7 olsrd.conf format. The jsoninfo plugin provides all of the
8 information that both the txtinfo and httpinfo plugins provide, as
9 well as quite a bit more.
11 There is a Java library called OlsrInfo that provides Java classes for
12 parsing the data from jsoninfo (and txtinfo also). It is based on the
13 Jackson JSON processing library
15 OlsrInfo: https://github.com/guardianproject/OlsrInfo
16 Jackson JSON: http://jackson.codehaus.org/
21 There are a number of commands for getting information from this
22 plugin. They are designed to be tacked onto a URL, but can also be
23 sent directly via a network socket. The commands are similar to the
24 txtinfo plugin, but not exactly the same.
26 If there is no command or no recognized command, then it sends the
27 /status output, which is the combination of /neighbors, /links,
28 /routes, /hna, /mid, /topology, /gateways, and /interfaces.
31 * /all - all of the data in JSON format
32 * /runtime - all of the data that reflects the runtime status of olsrd and the mesh
33 * /startup - all of the data about the startup configuration
36 * /neighbors (including 2-hop)
44 * /status - data that changes during runtime (all above commands combined)
47 * /config - the current configuration, i.e. what was loaded from the olsrd.conf
48 * /plugins - currently loaded plugins and their config parameters
50 start-up information not in JSON format:
51 * /olsrd.conf - the current config, formatted for writing directly to /etc/olsrd/olsrd.conf
57 The plugin accepts two parameters: "port" and "accept". There are no
58 futher parameters. Here's an example configuration for UNIX systems
59 (for Windows, change the plugin to end in .dll):
61 LoadPlugin "olsrd_jsoninfo.so.0.0"
63 # The port number on which the plugin will be listening
64 # PlParam "port" "9090"
66 # You can set an "accept" IP address that is allowed to connect to
67 # the plugin. If no address is specified, then localhost (127.0.0.1)
68 # is allowed by default. Only the last parameter specified will be used,
69 # others will be ignored.
70 # Use 0.0.0.0 to accept all connections
71 # PlParam "accept" "127.0.0.1"
73 # You can set a "listen" IP address that is used to determine the interface
74 # on which the plugin will be listening. If no address is specified, then
75 # the plugin will listen on all interfaes. Only the last parameter specified
76 # will be used, others will be ignored.
77 # PlParam "listen" "0.0.0.0"
79 # The first line of the specified file will be read. This line will then be
80 # included in the JSON reply as the value of the 'uuid' field.
81 # Mainly used for debugging.
82 # PlParam "uuidfile" "uuid.txt"
84 # Set to true to prepend HTTP headers before the JSON reply
85 # PlParam "httpheaders" "false"
87 # Set to true to only listen on IPv6 addresses when running in IPv6 mode.
88 # PlParam "ipv6only" "false"
95 You can use http URLs with various web tools to access the information:
97 curl http://localhost:9090/all
99 You can combine the various commands to generate a custom report:
101 curl http://localhost:9090/interfaces/routes/links
103 If you want a copy of the current configuration, you can download it
106 wget http://localhost:9090/olsrd.conf