disco_output
DescripciĆ³n
Imprime la salida JSON y sale del script.
Requisitos
- json
- sys
Ejemplo
import pandoraPlugintools as pt
import sys # Don't forget to import the sys module for the sys.exit() function
# Set values for _SUMMARY, _INFO, and _MONITORING_DATA (for demonstration purposes)
pt.set_disco_summary({'disk_usage': '80%'})
pt.set_disco_info_value('Disk usage information')
pt.add_disco_monitoring_data({'path': '/dev/sda1', 'usage': '70%'})
# Call the disco_output function to print JSON output and exit with a specific error level
pt.disco_output()