A system for collecting key information from all your servers and presenting it through an easy-to-use web GUI with search and browse functions. The previous generation of this system is used in production at the University of Oslo, Norway.
GNU General Public License v3.0
9
stars
7
forks
source link
Retrieve a specific file for all hosts in one API call #129
You can trick the search API function to do this by searching for a character that you know exists in all variants of the file:
https://nivlheim02.uio.no/api/v2/search?fields=hostname,content&filename=/etc/fstab&q=%2F
But, if the files don't have any content in common, or you can't be sure, you can't do it that way.
Some suggested solutions:
Let the search function support an empty query string (perhaps require a filename in that case)
Modify the file function to support an empty/blank hostname
You can trick the
search
API function to do this by searching for a character that you know exists in all variants of the file:https://nivlheim02.uio.no/api/v2/search?fields=hostname,content&filename=/etc/fstab&q=%2F
But, if the files don't have any content in common, or you can't be sure, you can't do it that way.Some suggested solutions:
search
function support an empty query string (perhaps require a filename in that case)file
function to support an empty/blank hostname( Requested by @paalbra )