Skip to content

Instantly share code, notes, and snippets.

@aduzsardi
Created August 15, 2020 18:55
Show Gist options
  • Save aduzsardi/3c0a7d4e0e6d202f046d560df13d8f9a to your computer and use it in GitHub Desktop.
Save aduzsardi/3c0a7d4e0e6d202f046d560df13d8f9a to your computer and use it in GitHub Desktop.
docker swarm inspect infromation - json output
docker node inspect self --format '{{json .}}' | jq .
{
"ID": "misdcojgeuz8ps4v1w93apoiz",
"Version": {
"Index": 443
},
"CreatedAt": "2020-08-08T21:58:17.93412711Z",
"UpdatedAt": "2020-08-15T12:15:50.442472266Z",
"Spec": {
"Labels": {},
"Role": "manager",
"Availability": "active"
},
"Description": {
"Hostname": "swarm01",
"Platform": {
"Architecture": "x86_64",
"OS": "linux"
},
"Resources": {
"NanoCPUs": 12000000000,
"MemoryBytes": 16662708224
},
"Engine": {
"EngineVersion": "19.03.12",
"Plugins": [
{
"Type": "Log",
"Name": "awslogs"
},
{
"Type": "Log",
"Name": "fluentd"
},
{
"Type": "Log",
"Name": "gcplogs"
},
{
"Type": "Log",
"Name": "gelf"
},
{
"Type": "Log",
"Name": "journald"
},
{
"Type": "Log",
"Name": "json-file"
},
{
"Type": "Log",
"Name": "local"
},
{
"Type": "Log",
"Name": "logentries"
},
{
"Type": "Log",
"Name": "splunk"
},
{
"Type": "Log",
"Name": "syslog"
},
{
"Type": "Network",
"Name": "bridge"
},
{
"Type": "Network",
"Name": "host"
},
{
"Type": "Network",
"Name": "ipvlan"
},
{
"Type": "Network",
"Name": "macvlan"
},
{
"Type": "Network",
"Name": "null"
},
{
"Type": "Network",
"Name": "overlay"
},
{
"Type": "Volume",
"Name": "local"
}
]
},
"TLSInfo": {
"TrustRoot": "",
"CertIssuerSubject": "",
"CertIssuerPublicKey": ""
}
},
"Status": {
"State": "ready",
"Addr": "10.88.133.10"
},
"ManagerStatus": {
"Leader": true,
"Reachability": "reachable",
"Addr": "10.88.133.10:2377"
}
}
# -----------------------------------------------------------------
docker info --format '{{json .}}' | jq .
{
"ID": "V6CN:HNWD:PENV:MYG3:2ORG:SYRC:P6LD:HJNM:P3GS:OZ3K:7VTR:6QWV",
"Containers": 2,
"ContainersRunning": 1,
"ContainersPaused": 0,
"ContainersStopped": 1,
"Images": 10,
"Driver": "overlay2",
"DriverStatus": [
[
"Backing Filesystem",
"extfs"
],
[
"Supports d_type",
"true"
],
[
"Native Overlay Diff",
"true"
]
],
"SystemStatus": null,
"Plugins": {
"Volume": [
"local"
],
"Network": [
"bridge",
"host",
"ipvlan",
"macvlan",
"null",
"overlay"
],
"Authorization": null,
"Log": [
"awslogs",
"fluentd",
"gcplogs",
"gelf",
"journald",
"json-file",
"local",
"logentries",
"splunk",
"syslog"
]
},
"MemoryLimit": true,
"SwapLimit": false,
"KernelMemory": true,
"KernelMemoryTCP": true,
"CpuCfsPeriod": true,
"CpuCfsQuota": true,
"CPUShares": true,
"CPUSet": true,
"PidsLimit": true,
"IPv4Forwarding": true,
"BridgeNfIptables": true,
"BridgeNfIp6tables": true,
"Debug": false,
"NFd": 49,
"OomKillDisable": true,
"NGoroutines": 168,
"SystemTime": "2020-08-15T21:52:19.01739868+03:00",
"LoggingDriver": "json-file",
"CgroupDriver": "cgroupfs",
"NEventsListener": 1,
"KernelVersion": "5.6.0-1020-oem",
"OperatingSystem": "Ubuntu 20.04.1 LTS",
"OSType": "linux",
"Architecture": "x86_64",
"IndexServerAddress": "https://index.docker.io/v1/",
"RegistryConfig": {
"AllowNondistributableArtifactsCIDRs": [],
"AllowNondistributableArtifactsHostnames": [],
"InsecureRegistryCIDRs": [
"127.0.0.0/8"
],
"IndexConfigs": {
"docker.io": {
"Name": "docker.io",
"Mirrors": [],
"Secure": true,
"Official": true
},
"gitlab.bigbrother.lokaal:5005": {
"Name": "gitlab.docker.lan:5005",
"Mirrors": [],
"Secure": false,
"Official": false
}
},
"Mirrors": []
},
"NCPU": 12,
"MemTotal": 16662708224,
"GenericResources": null,
"DockerRootDir": "/var/lib/docker",
"HttpProxy": "",
"HttpsProxy": "",
"NoProxy": "",
"Name": "swarm01",
"Labels": [],
"ExperimentalBuild": false,
"ServerVersion": "19.03.12",
"ClusterStore": "",
"ClusterAdvertise": "",
"Runtimes": {
"runc": {
"path": "runc"
}
},
"DefaultRuntime": "runc",
"Swarm": {
"NodeID": "misdcojgeuz8ps4v1w93apoiz",
"NodeAddr": "10.88.133.10",
"LocalNodeState": "active",
"ControlAvailable": true,
"Error": "",
"RemoteManagers": [
{
"NodeID": "misdcojgeuz8ps4v1w93apoiz",
"Addr": "10.88.133.10:2377"
}
],
"Nodes": 1,
"Managers": 1,
"Cluster": {
"ID": "mszs1lexkn4vlk2q1qqi3v703",
"Version": {
"Index": 40
},
"CreatedAt": "2020-08-08T21:58:17.93411479Z",
"UpdatedAt": "2020-08-12T18:04:07.645725131Z",
"Spec": {
"Name": "default",
"Labels": {},
"Orchestration": {
"TaskHistoryRetentionLimit": 5
},
"Raft": {
"SnapshotInterval": 10000,
"KeepOldSnapshots": 0,
"LogEntriesForSlowFollowers": 500,
"ElectionTick": 10,
"HeartbeatTick": 1
},
"Dispatcher": {
"HeartbeatPeriod": 5000000000
},
"CAConfig": {
"NodeCertExpiry": 7776000000000000
},
"TaskDefaults": {},
"EncryptionConfig": {
"AutoLockManagers": false
}
},
"TLSInfo": {
"TrustRoot": "",
"CertIssuerSubject": "",
"CertIssuerPublicKey": ""
},
"RootRotationInProgress": false,
"DefaultAddrPool": [
"10.0.0.0/8"
],
"SubnetSize": 24,
"DataPathPort": 4789
}
},
"LiveRestoreEnabled": false,
"Isolation": "",
"InitBinary": "docker-init",
"ContainerdCommit": {
"ID": "7ad184331fa3e55e52b890ea95e65ba581ae3429",
"Expected": "7ad184331fa3e55e52b890ea95e65ba581ae3429"
},
"RuncCommit": {
"ID": "dc9208a3303feef5b3839f4323d9beb36df0a9dd",
"Expected": "dc9208a3303feef5b3839f4323d9beb36df0a9dd"
},
"InitCommit": {
"ID": "fec3683",
"Expected": "fec3683"
},
"SecurityOptions": [
"name=apparmor",
"name=seccomp,profile=default"
],
"Warnings": [
"WARNING: No swap limit support"
],
"ClientInfo": {
"Debug": false,
"Plugins": [],
"Warnings": null
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment