Docker Need to discovery using servicenow Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2023 12:43 AM
Hi All,
One of my customers looking for Docker discovery in Linux devices.
I have already shared the required user privileges, but they are asking us what Sudo commands will execute to fetch that information into the CMDB ServiceNow.
Below link: I referred to and shared the User privileges
note: all the dockers are in the Linux devices, Kindly let us know the commands.
Your quick help will be much more appreciated!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2024 07:48 AM - edited 05-16-2024 07:49 AM
Hi,
The commands executed by the pattern are:
$sudo#docker version
$sudo#docker info > /dev/null 2>&1; echo $?
$sudo#docker version --format '{{.Server.GitCommit}}'
date -d '$build_date_as_string#' +%s
$sudo#docker version --format '{{.Server.Version}}'
$sudo#docker version --format '{{.Server.Os}}/{{.Server.Arch}}'
date -d '$build_date_as_string#' '+%Y-%m-%d %H:%M:%S'
$sudo#docker version --format \\'{{.Server.Version}}\\'
$sudo#docker version --format '{{.Server.GoVersion}}'
$sudo#docker version --format '{{.Server.BuildTime}}'
docker info > /dev/null 2>&1; echo $?
$sudo#docker images --filter dangling=false --format '{{.ID}}' | sort -u | tr '\\n' ' '
$sudo# docker image ls --digests --format '{{.ID}},{{.Repository}},{{.Digest}}'
I hope it helps!
Kind regards / Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 01:25 AM
Sorry,
There are two more:
${sudo} + " docker ps --format '{{.ID}}'"
${sudo} + " docker inspect --size " + it.toString()
With these additions we got the pattern working at a customer I worked with.
Kind regards / Jon