I have a requirement where I need to get hostname, memory, cores, storage, packages installed for multiple nodes(~1k).
I have approached the solution by using knife.
$ knife search node 'hostname:HostName1 OR hostname:HostName2 OR hostname:HostName3' -a hostname -a cpu.cores -a memory.total -a rpm -a filesystem.by_device -F j|jq '.'
And the typical output of this command is like;
{
"results": 3,
"rows": [
{
"MyHostName1": {
"hostname": "MyHostName1",
"cpu.cores": 4,
"memory.total": "15645184kB",
"rpm": {
"loger-multipath": [
{
"version": "0.4.9",
"release": "123.el7",
"arch": "x86_64"
}
],
"python": [
{
"version": "7.19.0",
"release": "19.el7",
"arch": "x86_64"
}
]
},
"filesystem.by_device": {
"/apps/logger/root_my-root": {
"kb_size": "8125880",
"kb_used": "2426760",
"kb_available": "5263308",
"percent_used": "32%",
"mount_options": [
"rw",
"discard",
"data=ordered"
],
"uuid": "87ujrf56-6yu6-654r-yu43-uy67yg43ws67",
"mounts": [
"/"
]
}
}
}
}
}
However, there are details which I do not need;
How can we set the display sequence same as that of the attribute list in the command, i.e. hostname then core, memory…
We get the file system names and their corresponding sizes, however, we are getting all the other tag values as well; how can we get just the file system name and the ( something similar to what we get from the df command; e.g. apps/logger/root_vg-apps: kb_size: 3997376 )
The output of the rpm attribute gives us the rpm package name, architecture, version and release information, how can we concatenate the output of multiple attributes in a single line ( something similar to the output when we run the yum list installed command; e.g loger-multipath.x86_64 0.4.9-123.el7 )
EDIT:
After much googling this is the progress:
knife search node 'HostName1 OR hostname:HostName2' -a cpu.cores -a memory.total -a filesystem.by_device -F j|jq '.rows[]|keys[] as $hostName|"\($hostName),\(.[$hostName]|."cpu.cores"),\(.[$hostName]|."memory.total"),\(.[$hostName]|."filesystem.by_device")"'
And the corresponding output
"HostName1,4,15645184kB,{\"/dev/mapper/root_vg-root\":{\"kb_size\":\"8125880\",\"kb_used\":\"2425220\",\"kb_available\":\"5264848\",\"percent_used\":\"32%\",\"total_inodes\":\"524288\",\"inodes_used\":\"88441\",\"inodes_available\":\"435847\",\"inodes_percent_used\":\"17%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"relatime\",\"seclabel\",\"discard\",\"data=ordered\"],\"uuid\":\"rthd-762c-41affff8-8927-065fsee20853c681\",\"mounts\":[\"/\"]},\"devtmpfs\":{\"kb_size\":\"7810756\",\"kb_used\":\"0\",\"kb_available\":\"7810756\",\"percent_used\":\"0%\",\"total_inodes\":\"1952689\",\"inodes_used\":\"403\",\"inodes_available\":\"1952286\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"devtmpfs\",\"mount_options\":[\"rw\",\"nosuid\",\"seclabel\",\"size=7810756k\",\"nr_inodes=1952689\",\"mode=755\"],\"mounts\":[\"/dev\"]},\"tmpfs\":{\"kb_size\":\"1564520\",\"kb_used\":\"0\",\"kb_available\":\"1564520\",\"percent_used\":\"0%\",\"total_inodes\":\"1955648\",\"inodes_used\":\"1\",\"inodes_available\":\"1955647\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"tmpfs\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"size=1564520k\",\"mode=700\",\"uid=627000\",\"gid=161\"],\"mounts\":[\"/dev/shm\",\"/run\",\"/sys/fs/cgroup\",\"/run/user/0\",\"/run/user/627000\"]},\"/dev/sda1\":{\"kb_size\":\"499656\",\"kb_used\":\"212068\",\"kb_available\":\"250892\",\"percent_used\":\"46%\",\"total_inodes\":\"32768\",\"inodes_used\":\"350\",\"inodes_available\":\"32418\",\"inodes_percent_used\":\"2%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"data=ordered\"],\"uuid\":\"857fgg-b2a2-42d8-9db2-dfrferf7544\",\"mounts\":[\"/boot\"]},\"/dev/mapper/root_vg-var\":{\"kb_size\":\"5029504\",\"kb_used\":\"4142128\",\"kb_available\":\"608848\",\"percent_used\":\"88%\",\"total_inodes\":\"327680\",\"inodes_used\":\"6191\",\"inodes_available\":\"321489\",\"inodes_percent_used\":\"2%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"noacl\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"dfef155456-ab4c-48f4-a7a5-5454sfdf\",\"mounts\":[\"/var\"]},\"/dev/mapper/root_vg-var--tmp\":{\"kb_size\":\"1998672\",\"kb_used\":\"6180\",\"kb_available\":\"1871252\",\"percent_used\":\"1%\",\"total_inodes\":\"131072\",\"inodes_used\":\"21\",\"inodes_available\":\"131051\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"vfghhhht542-ea7c-4c8b-9afd-frfgvbbn\",\"mounts\":[\"/var/tmp\"]},\"/dev/mapper/root_vg-apps\":{\"kb_size\":\"3997376\",\"kb_used\":\"495044\",\"kb_available\":\"3276236\",\"percent_used\":\"14%\",\"total_inodes\":\"262144\",\"inodes_used\":\"3203\",\"inodes_available\":\"258941\",\"inodes_percent_used\":\"2%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nodev\",\"relatime\",\"seclabel\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"fvfbvfbv55444-a813-4d9c-a9ac-7d50cfbfe345\",\"mounts\":[\"/apps\"]},\"/dev/mapper/root_vg-kdump\":{\"kb_size\":\"1998672\",\"kb_used\":\"6144\",\"kb_available\":\"1871288\",\"percent_used\":\"1%\",\"total_inodes\":\"131072\",\"inodes_used\":\"11\",\"inodes_available\":\"131061\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"frgrghg55-9673-47f5-aaac-4g4g4g1g1\",\"mounts\":[\"/kdump\"]},\"/dev/mapper/root_vg-home\":{\"kb_size\":\"1998672\",\"kb_used\":\"6544\",\"kb_available\":\"1870888\",\"percent_used\":\"1%\",\"total_inodes\":\"131072\",\"inodes_used\":\"83\",\"inodes_available\":\"130989\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"frbj4874-fe4d-4f82-ad86-41554ffv\",\"mounts\":[\"/home\"]},\"/dev/mapper/root_vg-tmp\":{\"kb_size\":\"1998672\",\"kb_used\":\"7916\",\"kb_available\":\"1869516\",\"percent_used\":\"1%\",\"total_inodes\":\"131072\",\"inodes_used\":\"51\",\"inodes_available\":\"131021\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"a995fd05-90a8-46a8-a192-0a02f68e476a\",\"mounts\":[\"/tmp\"]},\"/dev/mapper/root_vg-gcis2\":{\"kb_size\":\"20511312\",\"kb_used\":\"3191304\",\"kb_available\":\"16255048\",\"percent_used\":\"17%\",\"total_inodes\":\"1310720\",\"inodes_used\":\"33967\",\"inodes_available\":\"1276753\",\"inodes_percent_used\":\"3%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"relatime\",\"seclabel\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"fb4bb78a-7f33-47f1-87a6-dcbe50bc6349\",\"mounts\":[\"/apps/gcis2\"]},\"sysfs\":{\"fs_type\":\"sysfs\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\",\"seclabel\"],\"mounts\":[\"/sys\"]},\"proc\":{\"fs_type\":\"proc\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\"],\"mounts\":[\"/proc\"]},\"securityfs\":{\"fs_type\":\"securityfs\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\"],\"mounts\":[\"/sys/kernel/security\"]},\"devpts\":{\"fs_type\":\"devpts\",\"mount_options\":[\"rw\",\"nosuid\",\"noexec\",\"relatime\",\"seclabel\",\"gid=5\",\"mode=620\",\"ptmxmode=000\"],\"mounts\":[\"/dev/pts\"]},\"cgroup\":{\"fs_type\":\"cgroup\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\",\"seclabel\",\"net_prio\",\"net_cls\"],\"mounts\":[\"/sys/fs/cgroup/systemd\",\"/sys/fs/cgroup/perf_event\",\"/sys/fs/cgroup/blkio\",\"/sys/fs/cgroup/freezer\",\"/sys/fs/cgroup/cpu,cpuacct\",\"/sys/fs/cgroup/memory\",\"/sys/fs/cgroup/pids\",\"/sys/fs/cgroup/hugetlb\",\"/sys/fs/cgroup/cpuset\",\"/sys/fs/cgroup/devices\",\"/sys/fs/cgroup/net_cls,net_prio\"]},\"pstore\":{\"fs_type\":\"pstore\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\"],\"mounts\":[\"/sys/fs/pstore\"]},\"configfs\":{\"fs_type\":\"configfs\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/sys/kernel/config\"]},\"selinuxfs\":{\"fs_type\":\"selinuxfs\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/sys/fs/selinux\"]},\"systemd-1\":{\"fs_type\":\"autofs\",\"mount_options\":[\"rw\",\"relatime\",\"fd=30\",\"pgrp=1\",\"timeout=0\",\"minproto=5\",\"maxproto=5\",\"direct\",\"pipe_ino=16127\"],\"mounts\":[\"/proc/sys/fs/binfmt_misc\"]},\"debugfs\":{\"fs_type\":\"debugfs\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/sys/kernel/debug\"]},\"hugetlbfs\":{\"fs_type\":\"hugetlbfs\",\"mount_options\":[\"rw\",\"relatime\",\"seclabel\"],\"mounts\":[\"/dev/hugepages\"]},\"mqueue\":{\"fs_type\":\"mqueue\",\"mount_options\":[\"rw\",\"relatime\",\"seclabel\"],\"mounts\":[\"/dev/mqueue\"]},\"binfmt_misc\":{\"fs_type\":\"binfmt_misc\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/proc/sys/fs/binfmt_misc\"]},\"fusectl\":{\"fs_type\":\"fusectl\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/sys/fs/fuse/connections\"]},\"/dev/fd0\":{},\"/dev/sda\":{},\"/dev/sda2\":{\"fs_type\":\"LVM2_member\",\"uuid\":\"zrtcBv-4y6D-LG2a-Wt6M-h18d-K0BQ-zyl11h\"},\"/dev/mapper/root_vg-swap\":{\"fs_type\":\"swap\",\"uuid\":\"vfbvejgbg5456454-93a1-4a67-b33f-gtrbbbn\"},\"/dev/mapper/root_vg-pool0_tmeta\":{},\"/dev/mapper/root_vg-pool0-tpool\":{},\"/dev/mapper/root_vg-pool0\":{},\"/dev/mapper/root_vg-pool0_tdata\":{},\"rootfs\":{\"fs_type\":\"rootfs\",\"mount_options\":[\"rw\"],\"mounts\":[\"/\"]}}"
"HostName2,4,15645184kB,{\"/dev/mapper/root_vg-root\":{\"kb_size\":\"8125880\",\"kb_used\":\"2425220\",\"kb_available\":\"5264848\",\"percent_used\":\"32%\",\"total_inodes\":\"524288\",\"inodes_used\":\"88441\",\"inodes_available\":\"435847\",\"inodes_percent_used\":\"17%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"relatime\",\"seclabel\",\"discard\",\"data=ordered\"],\"uuid\":\"rthd-762c-41affff8-8927-065fsee20853c681\",\"mounts\":[\"/\"]},\"devtmpfs\":{\"kb_size\":\"7810756\",\"kb_used\":\"0\",\"kb_available\":\"7810756\",\"percent_used\":\"0%\",\"total_inodes\":\"1952689\",\"inodes_used\":\"403\",\"inodes_available\":\"1952286\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"devtmpfs\",\"mount_options\":[\"rw\",\"nosuid\",\"seclabel\",\"size=7810756k\",\"nr_inodes=1952689\",\"mode=755\"],\"mounts\":[\"/dev\"]},\"tmpfs\":{\"kb_size\":\"1564520\",\"kb_used\":\"0\",\"kb_available\":\"1564520\",\"percent_used\":\"0%\",\"total_inodes\":\"1955648\",\"inodes_used\":\"1\",\"inodes_available\":\"1955647\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"tmpfs\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"size=1564520k\",\"mode=700\",\"uid=627000\",\"gid=161\"],\"mounts\":[\"/dev/shm\",\"/run\",\"/sys/fs/cgroup\",\"/run/user/0\",\"/run/user/627000\"]},\"/dev/sda1\":{\"kb_size\":\"499656\",\"kb_used\":\"212068\",\"kb_available\":\"250892\",\"percent_used\":\"46%\",\"total_inodes\":\"32768\",\"inodes_used\":\"350\",\"inodes_available\":\"32418\",\"inodes_percent_used\":\"2%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"data=ordered\"],\"uuid\":\"857fgg-b2a2-42d8-9db2-dfrferf7544\",\"mounts\":[\"/boot\"]},\"/dev/mapper/root_vg-var\":{\"kb_size\":\"5029504\",\"kb_used\":\"4142128\",\"kb_available\":\"608848\",\"percent_used\":\"88%\",\"total_inodes\":\"327680\",\"inodes_used\":\"6191\",\"inodes_available\":\"321489\",\"inodes_percent_used\":\"2%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"noacl\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"dfef155456-ab4c-48f4-a7a5-5454sfdf\",\"mounts\":[\"/var\"]},\"/dev/mapper/root_vg-var--tmp\":{\"kb_size\":\"1998672\",\"kb_used\":\"6180\",\"kb_available\":\"1871252\",\"percent_used\":\"1%\",\"total_inodes\":\"131072\",\"inodes_used\":\"21\",\"inodes_available\":\"131051\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"vfghhhht542-ea7c-4c8b-9afd-frfgvbbn\",\"mounts\":[\"/var/tmp\"]},\"/dev/mapper/root_vg-apps\":{\"kb_size\":\"3997376\",\"kb_used\":\"495044\",\"kb_available\":\"3276236\",\"percent_used\":\"14%\",\"total_inodes\":\"262144\",\"inodes_used\":\"3203\",\"inodes_available\":\"258941\",\"inodes_percent_used\":\"2%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nodev\",\"relatime\",\"seclabel\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"fvfbvfbv55444-a813-4d9c-a9ac-7d50cfbfe345\",\"mounts\":[\"/apps\"]},\"/dev/mapper/root_vg-kdump\":{\"kb_size\":\"1998672\",\"kb_used\":\"6144\",\"kb_available\":\"1871288\",\"percent_used\":\"1%\",\"total_inodes\":\"131072\",\"inodes_used\":\"11\",\"inodes_available\":\"131061\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"frgrghg55-9673-47f5-aaac-4g4g4g1g1\",\"mounts\":[\"/kdump\"]},\"/dev/mapper/root_vg-home\":{\"kb_size\":\"1998672\",\"kb_used\":\"6544\",\"kb_available\":\"1870888\",\"percent_used\":\"1%\",\"total_inodes\":\"131072\",\"inodes_used\":\"83\",\"inodes_available\":\"130989\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"frbj4874-fe4d-4f82-ad86-41554ffv\",\"mounts\":[\"/home\"]},\"/dev/mapper/root_vg-tmp\":{\"kb_size\":\"1998672\",\"kb_used\":\"7916\",\"kb_available\":\"1869516\",\"percent_used\":\"1%\",\"total_inodes\":\"131072\",\"inodes_used\":\"51\",\"inodes_available\":\"131021\",\"inodes_percent_used\":\"1%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"relatime\",\"seclabel\",\"discard\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"a995fd05-90a8-46a8-a192-0a02f68e476a\",\"mounts\":[\"/tmp\"]},\"/dev/mapper/root_vg-gcis2\":{\"kb_size\":\"20511312\",\"kb_used\":\"3191304\",\"kb_available\":\"16255048\",\"percent_used\":\"17%\",\"total_inodes\":\"1310720\",\"inodes_used\":\"33967\",\"inodes_available\":\"1276753\",\"inodes_percent_used\":\"3%\",\"fs_type\":\"ext4\",\"mount_options\":[\"rw\",\"relatime\",\"seclabel\",\"stripe=16\",\"data=ordered\"],\"uuid\":\"fb4bb78a-7f33-47f1-87a6-dcbe50bc6349\",\"mounts\":[\"/apps/gcis2\"]},\"sysfs\":{\"fs_type\":\"sysfs\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\",\"seclabel\"],\"mounts\":[\"/sys\"]},\"proc\":{\"fs_type\":\"proc\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\"],\"mounts\":[\"/proc\"]},\"securityfs\":{\"fs_type\":\"securityfs\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\"],\"mounts\":[\"/sys/kernel/security\"]},\"devpts\":{\"fs_type\":\"devpts\",\"mount_options\":[\"rw\",\"nosuid\",\"noexec\",\"relatime\",\"seclabel\",\"gid=5\",\"mode=620\",\"ptmxmode=000\"],\"mounts\":[\"/dev/pts\"]},\"cgroup\":{\"fs_type\":\"cgroup\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\",\"seclabel\",\"net_prio\",\"net_cls\"],\"mounts\":[\"/sys/fs/cgroup/systemd\",\"/sys/fs/cgroup/perf_event\",\"/sys/fs/cgroup/blkio\",\"/sys/fs/cgroup/freezer\",\"/sys/fs/cgroup/cpu,cpuacct\",\"/sys/fs/cgroup/memory\",\"/sys/fs/cgroup/pids\",\"/sys/fs/cgroup/hugetlb\",\"/sys/fs/cgroup/cpuset\",\"/sys/fs/cgroup/devices\",\"/sys/fs/cgroup/net_cls,net_prio\"]},\"pstore\":{\"fs_type\":\"pstore\",\"mount_options\":[\"rw\",\"nosuid\",\"nodev\",\"noexec\",\"relatime\"],\"mounts\":[\"/sys/fs/pstore\"]},\"configfs\":{\"fs_type\":\"configfs\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/sys/kernel/config\"]},\"selinuxfs\":{\"fs_type\":\"selinuxfs\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/sys/fs/selinux\"]},\"systemd-1\":{\"fs_type\":\"autofs\",\"mount_options\":[\"rw\",\"relatime\",\"fd=30\",\"pgrp=1\",\"timeout=0\",\"minproto=5\",\"maxproto=5\",\"direct\",\"pipe_ino=16127\"],\"mounts\":[\"/proc/sys/fs/binfmt_misc\"]},\"debugfs\":{\"fs_type\":\"debugfs\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/sys/kernel/debug\"]},\"hugetlbfs\":{\"fs_type\":\"hugetlbfs\",\"mount_options\":[\"rw\",\"relatime\",\"seclabel\"],\"mounts\":[\"/dev/hugepages\"]},\"mqueue\":{\"fs_type\":\"mqueue\",\"mount_options\":[\"rw\",\"relatime\",\"seclabel\"],\"mounts\":[\"/dev/mqueue\"]},\"binfmt_misc\":{\"fs_type\":\"binfmt_misc\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/proc/sys/fs/binfmt_misc\"]},\"fusectl\":{\"fs_type\":\"fusectl\",\"mount_options\":[\"rw\",\"relatime\"],\"mounts\":[\"/sys/fs/fuse/connections\"]},\"/dev/fd0\":{},\"/dev/sda\":{},\"/dev/sda2\":{\"fs_type\":\"LVM2_member\",\"uuid\":\"zrtcBv-4y6D-LG2a-Wt6M-h18d-K0BQ-zyl11h\"},\"/dev/mapper/root_vg-swap\":{\"fs_type\":\"swap\",\"uuid\":\"vfbvejgbg5456454-93a1-4a67-b33f-gtrbbbn\"},\"/dev/mapper/root_vg-pool0_tmeta\":{},\"/dev/mapper/root_vg-pool0-tpool\":{},\"/dev/mapper/root_vg-pool0\":{},\"/dev/mapper/root_vg-pool0_tdata\":{},\"rootfs\":{\"fs_type\":\"rootfs\",\"mount_options\":[\"rw\"],\"mounts\":[\"/\"]}}"
I know this seems a bit messy; any help is welcome
looking at the json provided in the question, it seems that your query does not use the right values for the key that you specify -- namely, hostname -- you specified hostname:HostName1 where it feels it needs to be hostname:MyHostName1.
also, you can drop the node argument from the search command and specify it in the query, such as node:my.node.name.