simple.json 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // This is a simple example of a configuration for Control-Agent (CA) or simply
  2. // Agent. This server provides RESTful interface for all Kea servers.
  3. {
  4. "Control-agent":
  5. {
  6. // We need to specify where the agent should listen to incoming HTTP
  7. // queries. Note that agent does not provide SSL or TLS protection
  8. // on its own, so limiting the traffic to localhost is a good idea.
  9. "http-host": "localhost",
  10. // Another mandatory parameter is the HTTP port.
  11. "http-port": 8000,
  12. // This map specifies where control channel of each server is configured
  13. // to listen on. See 'control-socket' object in the respective
  14. // servers. At this time the only supported socket type is "unix".
  15. // Make sure that the Agent and respective servers configuration
  16. // matches exactly, otherwise they won't be able to communicate.
  17. "control-sockets":
  18. {
  19. // This is how the Agent can communicate with the DHCPv4 server.
  20. "dhcp4-server":
  21. {
  22. "socket-type": "unix",
  23. "socket-name": "/path/to/the/unix/socket-v4"
  24. },
  25. // Location of the DHCPv6 command channel socket.
  26. "dhcp6-server":
  27. {
  28. "socket-type": "unix",
  29. "socket-name": "/path/to/the/unix/socket-v6"
  30. },
  31. // Currently DHCP-DDNS (nicknamed D2) does not support
  32. // command channel yet, but we hope this will change in the
  33. // future.
  34. "d2-server":
  35. {
  36. "socket-type": "unix",
  37. "socket-name": "/path/to/the/unix/socket-d2"
  38. }
  39. },
  40. // CA is able to load hook libraries that augment its operation.
  41. // The primary functionality is the ability to add new commands.
  42. "hooks-libraries": [
  43. // Hook libraries list may contain more than one library.
  44. {
  45. // The only necessary parameter is the library filename.
  46. "library": "/opt/local/control-agent-commands.so",
  47. // Some libraries may support parameters. Make sure you
  48. // type this section carefully, as the CA does not validate
  49. // it (because the format is library specific).
  50. "parameters": {
  51. "param1": "foo"
  52. }
  53. }
  54. ]
  55. },
  56. // Similar to other Kea components, CA also uses logging.
  57. "Logging":
  58. {
  59. "loggers": [
  60. {
  61. "name": "kea-ctrl-agent",
  62. "output_options": [
  63. {
  64. "output": "/var/log/kea-ctrl-agent.log"
  65. }
  66. ],
  67. "severity": "INFO",
  68. "debuglevel": 0
  69. }
  70. ]
  71. }
  72. }