-
Notifications
You must be signed in to change notification settings - Fork 84
How to retrieve node last checkin time? #368
Comments
Ah ha, ok, so according to jtimberman blog it looks like what I want is an ohai attribute
However, what I'm seeing is an empty
The output of which is:
So I guess the question is am I on the right track here? If no, how do I access node attributes via Ridley? Finally, is the reason Thanks! |
Thanks for filing a GitHub Issue. At Chef, we use GitHub Issues to track bugs and feature requests. Questions like "How do I .... with Chef?" are better answered by our awesome community on the Chef mailing lists, or on StackOverflow. (Please pick only one place to ask your question, however, as it's considered impolite to post the same question to multiple forums.) You can find information about joining and asking questions on our mailing lists here. On StackOverflow, please tag your question with the "chef" label so that it shows up in this list. In this instance:
per the docs, you have to reload an object before it's fully populated: https://github.com/berkshelf/ridley#listing |
Hi @thommay , Thanks for the reply! I knew it was something super simple I had overlooked. However, I'll point out that this is buried under the overarching "CRUD" heading, I've probably been over this doc. a half dozen times and missed the "reload" comment. Perhaps calling that out could help others in the future. And I do appreciate that there is an awesome community, however, when asked in slack this question was met with crickets, so while asking the community is good in theory, sometimes the best place for rather specific questions about a project is the project itself. Additionally, there are a number of issues I pointed out above that, as someone who's never used Ridley before, you could see how I could conflate the two issues... I mean, the warning even says "This can cause unexpected behavior when accessing the key via as a property." |
Hello,
I'm attempting to replicate the functionality of
knife status
with an API request as we have a need to ingest this information.However, I can't for the life of me figure out how to obtain the last checkin time of a node.
The following seems to dump all the information about the node, except checkin time:
I'm sure it's something simple I've just overlooked... Any help is greatly appreciated!
(also, could someone explain why my attributes are only accessible via the
._attributes_
method and not via.attributes
?)The text was updated successfully, but these errors were encountered: