{ "code_name": "dockerdisc", "unique_prefix": "DOCKERDISC", "plugin_type": "other", "enabled": true, "data_source": "script", "show_ui": true, "localized": [ "display_name", "description", "icon" ], "display_name": [ { "language_code": "en_us", "string": "Docker discovery" } ], "icon": [ { "language_code": "en_us", "string": "" } ], "description": [ { "language_code": "en_us", "string": "Enriches known Docker hosts with their running containers." } ], "params": [ { "name": "hosts", "type": "setting", "value": "DOCKERDISC_hosts", "base64": true, "timeoutMultiplier": true } ], "mapped_to_table": "CurrentScan", "database_column_definitions": [ { "column": "index", "css_classes": "col-sm-2", "show": true, "type": "none", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Index" } ] }, { "column": "plugin", "css_classes": "col-sm-2", "show": false, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "N/A" } ] }, { "column": "objectPrimaryId", "mapped_to_column": "scanParentMAC", "css_classes": "col-sm-2", "show": true, "type": "device_mac", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Container host" } ] }, { "column": "objectSecondaryId", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Container" } ] }, { "column": "dateTimeCreated", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "First seen" } ] }, { "column": "dateTimeChanged", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Changed" } ] }, { "column": "watchedValue1", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Image" } ] }, { "column": "watchedValue2", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Compose Project / Service" } ] }, { "column": "watchedValue3", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Network Driver" } ] }, { "column": "watchedValue4", "css_classes": "col-sm-2", "show": true, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Container MAC" } ] }, { "column": "extra", "mapped_to_column": "scanLastIP", "css_classes": "col-sm-3", "show": true, "type": "label", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "IP" } ] }, { "column": "helpVal1", "mapped_to_column": "scanMac", "css_classes": "col-sm-2", "show": false, "type": "none", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "N/A" } ] }, { "column": "helpVal2", "mapped_to_column": "scanCreatesDevice", "css_classes": "col-sm-2", "show": false, "type": "none", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "N/A" } ] }, { "column": "Dummy", "mapped_to_column": "scanSourcePlugin", "mapped_to_column_data": { "value": "DOCKERDISC" }, "css_classes": "col-sm-2", "show": false, "type": "none", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "N/A" } ] }, { "column": "userData", "css_classes": "col-sm-2", "show": false, "type": "textbox_save", "default_value": "", "options": [], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Comments" } ] }, { "column": "status", "css_classes": "col-sm-1", "show": false, "type": "replace", "default_value": "", "options": [ { "equals": "watched-not-changed", "replacement": "
" }, { "equals": "watched-changed", "replacement": "
" }, { "equals": "new", "replacement": "
" }, { "equals": "missing-in-last-scan", "replacement": "
" } ], "localized": [ "name" ], "name": [ { "language_code": "en_us", "string": "Status" } ] } ], "settings": [ { "function": "RUN", "events": [ "run" ], "type": { "dataType": "string", "elements": [ { "elementType": "select", "elementOptions": [], "transformers": [] } ] }, "default_value": "disabled", "options": [ "disabled", "once", "schedule", "always_after_scan" ], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "When to run" } ], "description": [ { "language_code": "en_us", "string": "Enable a regular Docker discovery run. If you select schedule the scheduling settings from below are applied. If you select once the scan is run only once on start of the application (container) for the time specified in DOCKERDISC_RUN_TIMEOUT setting." } ] }, { "function": "IMPORT_ON", "type": { "dataType": "boolean", "elements": [ { "elementType": "input", "elementOptions": [ { "type": "checkbox" } ], "transformers": [] } ] }, "default_value": true, "options": [], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Allow updating existing devices from this plugin's data" } ], "description": [ { "language_code": "en_us", "string": "On by default. Turn off to make this run purely informational - no CurrentScan promotion at all, so a container's own already-existing device (found independently by ARP/Nmap) won't get its presence/IP/parent updated from this plugin either, regardless of DOCKERDISC_CREATE_DEV." } ] }, { "function": "CMD", "type": { "dataType": "string", "elements": [ { "elementType": "input", "elementOptions": [ { "readonly": "true" } ], "transformers": [] } ] }, "default_value": "python3 /app/server/plugins/dockerdisc/script.py", "options": [], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Command" } ], "description": [ { "language_code": "en_us", "string": "Command to run" } ] }, { "function": "RUN_SCHD", "type": { "dataType": "string", "elements": [ { "elementType": "span", "elementOptions": [ { "cssClasses": "input-group-addon validityCheck" }, { "getStringKey": "Gen_ValidIcon" } ], "transformers": [] }, { "elementType": "input", "elementOptions": [ { "focusout": "validateRegex(this)" }, { "base64Regex": "Xig/OlwqfCg/OlswLTldfFsxLTVdWzAtOV18WzAtOV0rLVswLTldKyg/Oi9bMC05XSspP3xcKi9bMC05XSspKSg/OiwoPzpbMC05XXxbMS01XVswLTldfFswLTldKy1bMC05XSsoPzovWzAtOV0rKT98XCovWzAtOV0rKSkqXHMrKD86XCp8KD86WzAtOV18MVswLTldfDJbMC0zXXxbMC05XSstWzAtOV0rKD86L1swLTldKyk/fFwqL1swLTldKykpKD86LCg/OlswLTldfDFbMC05XXwyWzAtM118WzAtOV0rLVswLTldKyg/Oi9bMC05XSspP3xcKi9bMC05XSspKSpccysoPzpcKnwoPzpbMS05XXxbMTJdWzAtOV18M1swMV18WzAtOV0rLVswLTldKyg/Oi9bMC05XSspP3xcKi9bMC05XSspKSg/OiwoPzpbMS05XXxbMTJdWzAtOV18M1swMV18WzAtOV0rLVswLTldKyg/Oi9bMC05XSspP3xcKi9bMC05XSspKSpccysoPzpcKnwoPzpbMS05XXwxWzAtMl18WzAtOV0rLVswLTldKyg/Oi9bMC05XSspP3xcKi9bMC05XSspKSg/OiwoPzpbMS05XXwxWzAtMl18WzAtOV0rLVswLTldKyg/Oi9bMC05XSspP3xcKi9bMC05XSspKSpccysoPzpcKnwoPzpbMC02XXxbMC02XS1bMC02XSg/Oi9bMC05XSspP3xcKi9bMC05XSspKSg/OiwoPzpbMC02XXxbMC02XS1bMC02XSg/Oi9bMC05XSspP3xcKi9bMC05XSspKSok" } ], "transformers": [] } ] }, "default_value": "*/5 * * * *", "options": [], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Schedule" } ], "description": [ { "language_code": "en_us", "string": "Only enabled if you select schedule in the DOCKERDISC_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." } ] }, { "function": "RUN_TIMEOUT", "type": { "dataType": "integer", "elements": [ { "elementType": "input", "elementOptions": [ { "type": "number" } ], "transformers": [] } ] }, "default_value": 60, "options": [], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Run timeout" } ], "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." } ] }, { "function": "hosts", "type": { "dataType": "array", "elements": [ { "elementType": "button", "elementOptions": [ { "sourceSuffixes": [] }, { "separator": "" }, { "cssClasses": "col-xs-12" }, { "onClick": "addViaPopupForm(this)" }, { "getStringKey": "Gen_Add" } ], "transformers": [] }, { "elementType": "select", "elementHasInputValue": 1, "elementOptions": [ { "multiple": "true" }, { "readonly": "true" }, { "editable": "true" }, { "popupForm": [ { "function": "DOCKERDISC_SOCKET_PROXY_URL", "type": { "dataType": "string", "elements": [ { "elementType": "input", "elementOptions": [ { "placeholder": "http://docker-socket-proxy:2375" }, { "cssClasses": "col-sm-10" } ], "transformers": [] } ] }, "default_value": "http://docker-socket-proxy:2375", "options": [], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Docker Socket Proxy URL" } ], "description": [ { "language_code": "en_us", "string": "Base URL for the read-only Docker Socket Proxy endpoint for this Docker host (requires the CONTAINERS, INFO, and NETWORKS permissions)." } ] }, { "function": "DOCKERDISC_HOST_MAC", "type": { "dataType": "string", "elements": [ { "elementType": "input", "elementOptions": [ { "placeholder": "aa:bb:cc:dd:ee:ff" }, { "cssClasses": "col-sm-10" } ], "transformers": [] } ] }, "default_value": "", "options": [], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Docker Host MAC Address (Manual)" } ], "description": [ { "language_code": "en_us", "string": "Manually configured physical MAC address of the Docker host. When set, it is used immediately - no Socket Proxy /info call is made. Leave blank to auto-detect the host via hostname matching instead. The host must already exist as a device in NetAlertX (found via ARP/Nmap) - this plugin never creates it." } ] } ] } ], "transformers": [ "name|base64" ] }, { "elementType": "button", "elementOptions": [ { "sourceSuffixes": [] }, { "separator": "" }, { "cssClasses": "col-xs-6" }, { "onClick": "removeFromList(this)" }, { "getStringKey": "Gen_Remove_Last" } ], "transformers": [] }, { "elementType": "button", "elementOptions": [ { "sourceSuffixes": [] }, { "separator": "" }, { "cssClasses": "col-xs-6" }, { "onClick": "removeAllOptions(this)" }, { "getStringKey": "Gen_Remove_All" } ], "transformers": [] } ] }, "default_value": [], "options": [], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Docker hosts" } ], "description": [ { "language_code": "en_us", "string": "One entry per Docker host to track. Each entry pairs a read-only Docker Socket Proxy URL with that host's device, matched either by a manually configured MAC (used immediately when set) or by auto-detected hostname. Every container found on a host is listed under that host's own Device Details -> Plugins -> DOCKERDISC tab - the host device must already exist in NetAlertX (via ARP/Nmap); this plugin never creates devices." } ] }, { "function": "CREATE_DEV", "type": { "dataType": "boolean", "elements": [ { "elementType": "input", "elementOptions": [ { "type": "checkbox" } ], "transformers": [] } ] }, "default_value": false, "options": [], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Create/confirm devices for containers with a real MAC" } ], "description": [ { "language_code": "en_us", "string": "When on, a container on a macvlan/ipvlan network (its own LAN-visible MAC) can create or confirm its own device entry, parented to its Docker host. Containers without their own MAC (bridge/overlay/etc.) never create a device either way." } ] }, { "function": "WATCH", "type": { "dataType": "array", "elements": [ { "elementType": "select", "elementOptions": [ { "multiple": "true", "orderable": "true" } ], "transformers": [] } ] }, "default_value": [], "options": [ "watchedValue1", "watchedValue2", "watchedValue3", "watchedValue4" ], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Watched" } ], "description": [ { "language_code": "en_us", "string": "Send a notification if selected values change. Use CTRL + Click to select/deselect. " } ] }, { "function": "REPORT_ON", "type": { "dataType": "array", "elements": [ { "elementType": "select", "elementOptions": [ { "multiple": "true", "orderable": "true" } ], "transformers": [] } ] }, "default_value": [], "options": [ "new", "watched-changed", "watched-not-changed", "missing-in-last-scan" ], "localized": [ "name", "description" ], "name": [ { "language_code": "en_us", "string": "Report on" } ], "description": [ { "language_code": "en_us", "string": "Send a notification only on these statuses. new means a new unique (unique combination of PrimaryId and SecondaryId) object was discovered. watched-changed means that selected watchedValueN columns changed." } ] } ] }