settings.sample.py 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ### App launching ###
  2. SECRET_KEY = "guyéuyuyugguyguyguyuyi" # This must be kept secret to ensure cookies privacy
  3. # Listening interface (0.0.0.0 listens everywhere)
  4. INTERFACE = "127.0.0.1"
  5. PORT = 5000
  6. ### EXTRAS ###
  7. # Default module extra fields
  8. # You put here the keys you want to appear in every module
  9. DEFAULT_MOD_EXTRA = ['Sample field', 'Another field']
  10. # Default environment extra fields
  11. # You put here the keys you want to appear in every environment
  12. DEFAULT_ENV_EXTRA = ['Sample field', 'Another field']
  13. # Default host extra fields
  14. # You put here the keys you want to appear in every host
  15. DEFAULT_HOST_EXTRA = ['Sample field', 'Another field']
  16. # Here will be stored the files that can be uploaded in extra fields
  17. UPLOAD_FOLDER = './data/files/'
  18. # These are the extensions allowed to upload
  19. ALLOWED_EXTENSIONS = set(['json', 'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif', 'JPG'])
  20. # Here is the list of useful URLs you want to appear at the top of the main page
  21. # This can be used as a small portal to other services
  22. USEFUL_URLS = {
  23. "My favourite URL": "http://git.an/",
  24. }
  25. ### DATABASES ###
  26. # Source bases
  27. SOURCE_BASE = {
  28. 'prod': {
  29. 'name': 'Prod',
  30. 'file': 'sqlite:///data/prod.db',
  31. 'address': 'my-livestatus-prod-instance.mydomain',
  32. 'port': 6557,
  33. },
  34. 'preprod': {
  35. 'name': 'Preprod',
  36. 'file': 'sqlite:///data/preprod.db',
  37. 'address': 'my-livestatus-preprod-instance.mydomain',
  38. 'port': 6557,
  39. },
  40. }
  41. # Must be a existing key in SOURCE_BASE
  42. DEFAULT_BASE = 'prod'
  43. ### DMZ guessing ###
  44. LOCATIONS = {
  45. 'MDC': { # My Datacenter
  46. 'color': 'lightgreen', # Must be a valid CSS color, can be hexadecimal (#42DE2A)
  47. 'subnet': [ # The list of subnet matching the DMZ to be applied on the host address
  48. '10.20.0.0/21',
  49. '10.30.0.0/24',
  50. ]
  51. },
  52. 'MSDC': { # My second Datacenter
  53. 'color': 'orange',
  54. 'subnet': [
  55. '10.10.0.0/24',
  56. ]
  57. },
  58. }
  59. ### NAGIOS GROUPS AND SORTING ###
  60. # This is the common prefix to ALL host groups in Nagios
  61. # It must be general enough to include all wanted hosts when querying Livestatus
  62. HOSTGROUP_PREFIX = "my_app_group"
  63. # These are the Nagios groups a host can belong to, but which must be discarded since they are not representative
  64. # For example, one group can be exactly the prefix, and can contain all the host of the application. It's thus not
  65. # representative of the architecture and must be discarded.
  66. # They are always discarded except if they are the only group remaining which begins with HOSTGROUP_PREFIX
  67. DISCARDED_GROUPS = ['my_app_group', 'my_app_group_useless_subgroup']
  68. # These is the main module list, that sort all environments in their respective module
  69. # HOSTGROUP_PREFIX is preprended to all environment name in there, so that its less repetitive and easier to type
  70. ENV_LIST = {
  71. 'My First Application': [
  72. '_first_group',
  73. '_second_group',
  74. '_third_group',
  75. ],
  76. 'Various applications': [
  77. '_some_grp',
  78. '_another_grp',
  79. ],
  80. }