{ "code_name": "db_cleanup", "unique_prefix": "DBCLNP", "plugin_type": "system", "enabled": true, "data_source": "script", "show_ui": false, "localized": ["display_name", "description", "icon"], "display_name": [ { "language_code": "en_us", "string": "DB cleanup" } ], "icon": [ { "language_code": "en_us", "string": "" } ], "description": [ { "language_code": "en_us", "string": "A plugin to schedule database cleanup & upkeep tasks." } ], "params" : [{ "name" : "pluginskeephistory", "type" : "setting", "value" : "PLUGINS_KEEP_HIST" }, { "name" : "daystokeepevents", "type" : "setting", "value" : "DAYS_TO_KEEP_EVENTS" }, { "name" : "hourstokeepnewdevice", "type" : "setting", "value" : "HRS_TO_KEEP_NEWDEV" }, { "name" : "pholuskeepdays", "type" : "setting", "value" : "PHOLUS_DAYS_DATA" } ], "settings": [ { "function": "RUN", "events": ["run"], "type": "text.select", "default_value":"schedule", "options": ["disabled", "once", "schedule", "always_after_scan"], "localized": ["name", "description"], "name" :[{ "language_code":"en_us", "string" : "When to run" }, { "language_code":"es_es", "string" : "Cuándo ejecutar" }, { "language_code":"de_de", "string" : "Wann laufen" }], "description": [{ "language_code":"en_us", "string" : "When the cleanup should be performed. An hourly or daily SCHEDULE is a good option." }] }, { "function": "CMD", "type": "readonly", "default_value": "python3 /home/pi/pialert/front/plugins/db_cleanup/script.py pluginskeephistory={pluginskeephistory} hourstokeepnewdevice={hourstokeepnewdevice} daystokeepevents={daystokeepevents} pholuskeepdays={pholuskeepdays}", "options": [], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Command" }, { "language_code": "es_es", "string": "Comando" }, { "language_code": "de_de", "string": "Befehl" } ], "description": [ { "language_code": "en_us", "string": "Command to run. This can not be changed" }, { "language_code": "es_es", "string": "Comando a ejecutar. Esto no se puede cambiar" }, { "language_code": "de_de", "string": "Befehl zum Ausführen. Dies kann nicht geändert werden" } ] }, { "function": "RUN_SCHD", "type": "text", "default_value":"*/30 * * * *", "options": [], "localized": ["name", "description"], "name" : [{ "language_code":"en_us", "string" : "Schedule" }, { "language_code":"es_es", "string" : "Schedule" }, { "language_code":"de_de", "string" : "Schedule" }], "description": [{ "language_code":"en_us", "string" : "Only enabled if you select schedule in the DBCLNP_RUN setting. Make sure you enter the schedule in the correct cron-like format (e.g. validate at crontab.guru). For example entering 0 4 * * * will run the scan after 4 am in the TIMEZONE you set above. Will be run NEXT time the time passes." }, { "language_code":"es_es", "string" : "Solo está habilitado si selecciona schedule en la configuración DBCLNP_RUN. Asegúrese de ingresar la programación en el formato similar a cron correcto (por ejemplo, valide en crontab.guru). Por ejemplo, ingresar 0 4 * * * ejecutará el escaneo después de las 4 a.m. en el TIMEZONE que configuró arriba. Se ejecutará la PRÓXIMA vez que pase el tiempo." }, { "language_code":"de_de", "string" : "Nur aktiviert, wenn Sie schedule in der DBCLNP_RUN-Einstellung auswählen. Stellen Sie sicher, dass Sie den Zeitplan im richtigen Cron-ähnlichen Format eingeben (z. B. validieren unter crontab.guru). Wenn Sie beispielsweise 0 4 * * * eingeben, wird der Scan nach 4 Uhr morgens in der TIMEZONE den Sie oben festgelegt haben. Wird das NÄCHSTE Mal ausgeführt, wenn die Zeit vergeht." }] }, { "function": "RUN_TIMEOUT", "type": "integer", "default_value": 30, "options": [], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Run timeout" }, { "language_code": "es_es", "string": "Tiempo límite de ejecución" }, { "language_code": "de_de", "string": "Zeitüberschreitung" } ], "description": [ { "language_code": "en_us", "string": "Maximum time in seconds to wait for the script to finish. If this time is exceeded the script is aborted." }, { "language_code": "es_es", "string": "Tiempo máximo en segundos para esperar a que finalice el script. Si se supera este tiempo, el script se cancela." }, { "language_code": "de_de", "string": "Maximale Zeit in Sekunden, die auf den Abschluss des Skripts gewartet werden soll. Bei Überschreitung dieser Zeit wird das Skript abgebrochen." } ] }, { "function": "NOTIFI_HIST", "type": "integer", "default_value": 100, "options": [], "localized": ["name", "description"], "name": [ { "language_code": "en_us", "string": "Notifications History" } ], "description": [ { "language_code": "en_us", "string": "How many historical entries of Notifications should be kept. This influences how many entries are also available in the Report section in the UI" } ] } ], "database_column_definitions": [ ] }