'knife search for nested attribute

I want to search for a node using knife search command for a node which has override attributes in node file.

I tried the following but it didn't work

knife search node "datadog.agent_version::5.4.3-1"

This is how I have the override specified in the node file

    "datadog": {
      "agent_version": "5.4.3-1"
    },

Any suggestion on this ?



Solution 1:[1]

Something like that should work knife search node "datadog_agent_version:5.4.3-1". This functionality is fully documented.

Solution 2:[2]

Have you run chef-client after changing attributes? I believe new attributes appear only after successful chef-client run.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dmitry S
Solution 2 Oleksandr Slynko