config.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. # There is a built-in micro proxy that will host the webui and REST API all on
  2. # one port (this is called the "Single HTTP Frontend") and means you just need
  3. # one open port in the container/firewalls/etc.
  4. #
  5. # Listen on all addresses available, port 1337
  6. listenAddressSingleHTTPFrontend: 0.0.0.0:1337
  7. # Choose from INFO (default), WARN and DEBUG
  8. logLevel: "INFO"
  9. # Actions (buttons) to show up on the WebUI:
  10. actions:
  11. - title: Restart media container
  12. shell: docker restart mediacontainer
  13. icon: box
  14. entity: container
  15. - title: Check disk space
  16. icon: disk
  17. shell: df -h /media
  18. popupOnStart: execution-dialog-stdout-only
  19. - title: check dmesg logs
  20. shell: dmesg | tail
  21. icon: logs
  22. popupOnStart: execution-dialog
  23. # This will run a simple script that you create.
  24. - title: Run backup script
  25. shell: /opt/backupScript.sh
  26. shellAfterCompleted: "apprise -t 'Notification: Backup script completed' -b 'The backup script completed with code {{ exitCode}}. The log is: \n {{ stdout }} '"
  27. maxConcurrent: 1
  28. timeout: 10
  29. icon: backup
  30. popupOnStart: execution-dialog
  31. - title: date
  32. shell: date
  33. timeout: 6
  34. icon: clock
  35. popupOnStart: execution-button
  36. # This will send 1 ping (-c 1)
  37. # Docs: https://docs.olivetin.app/action-ping.html
  38. - title: Ping host
  39. shell: ping {{ host }} -c {{ count }}
  40. icon: ping
  41. timeout: 100
  42. arguments:
  43. - name: host
  44. title: host
  45. type: ascii_identifier
  46. default: example.com
  47. description: The host that you want to ping
  48. - name: count
  49. title: Count
  50. type: int
  51. default: 1
  52. description: How many times to do you want to ping?
  53. # OliveTin can run long-running jobs like Ansible playbooks.
  54. #
  55. # For such jobs, you will need to install ansible-playbook on the host where
  56. # you are running OliveTin, or in the container.
  57. #
  58. # You probably want a much longer timeout as well (so that ansible completes).
  59. - title: "Run Ansible Playbook"
  60. icon: "&#x1F1E6"
  61. shell: ansible-playbook -i /etc/hosts /root/myRepo/myPlaybook.yaml
  62. timeout: 120
  63. # Restart httpd on host "server1"
  64. # Docs: https://docs.olivetin.app/action-ping.html
  65. - title: restart httpd on server1
  66. titleAlias: restart_httpd
  67. icon: restart
  68. timeout: 1
  69. shell: ssh root@server1 'service httpd restart'
  70. # OliveTin can control containers - docker is just a command line app.
  71. #
  72. # However, if you are running in a container you will need to do some setup,
  73. # see the docs below.
  74. #
  75. # Docs: https://docs.olivetin.app/action-container-control.html
  76. - title: Restart Docker Container
  77. icon: restart
  78. shell: docker restart {{ container }}
  79. arguments:
  80. - name: container
  81. title: Container name
  82. choices:
  83. - value: plex
  84. - value: traefik
  85. - value: grafana
  86. - title: Delete old backups
  87. icon: ashtonished
  88. shell: rm -rf /opt/oldBackups/
  89. arguments:
  90. - type: confirmation
  91. title: Are you sure?!
  92. - title: Server1 Power Off
  93. shell: echo "Power Off Server 1"
  94. - title: Server2 Wake On LAN
  95. shell: echo "Sending Wake on LAN to Server 2"
  96. - title: Server2 Power Off
  97. shell: echo "Power Off Server 2"
  98. - title: Ping All Servers
  99. shell: echo "Ping all servers"
  100. icon: ping
  101. dashboards:
  102. - title: My Servers
  103. contents:
  104. - title: Server Power Controls
  105. type: fieldset
  106. contents:
  107. - title: Server 1
  108. contents:
  109. - link: Server1 Power Off
  110. - title: Server 2
  111. contents:
  112. - link: Server2 Wake On LAN
  113. - link: Server2 Power Off
  114. - title: Server Utilities
  115. type: fieldset
  116. contents:
  117. - link: Ping All Servers