puppetboard
puppetboard copied to clipboard
csv export
Just got a question to deliver a list for a boss, who wanted to "play with the results" in a spreadsheet.
Found myself missing puppet-dashboard's CSV export feature :)
It would be great, if one could export all lists (complete list of nodenames, and also resultsets under facts) as csv.
You're going to have to be a bit more specific here. I never used the CSV export so I have no idea what data it exported and how that was structured.
the idea was to merely get the resultset in a csv export format. f.ex. a fact search on physicalprocessorcount - which shows a list of nodenames and a number, would simply have a ilnk to "csv export", which would return a list with: name, physicalprocessorcount node1.example.net,2 node2.example.net,1
Hi, i'm maybe little late, but here a simple way to do it: #!/usr/bin/python import sys reload(sys) sys.setdefaultencoding("utf-8") from pypuppetdb import connect db = connect()
facts = db.facts() for fact in facts: print fact.node + ';', fact.name + ';', fact.value
And you can parse it to create your final csv file.
regards
Are there any plans to add this as a feature? I too could use it in my organisation.
@KlavsKlavsen Did you find a usable workaround that we can add as pull request, or should we work on it?
@larsnaesbye I'm sorry I really have forgotten how I resolved this.. I think I just wrote some python - using pypuppetdb plugin - which can easily get a list hosts who has a certain fact and the facts contents. Thats what I'd do today anyways :)
@KlavsKlavsen : okay, that sounds reasonable. I just think it would be better if we implemented a simple button/link that dumped the table to CSV or similar.