Hi all,
Just wanted to reach out and see if something might have some kind a trick that I haven’t thought of cause I am running into a brick wall every which way I try it. Just short background story - I am building a quick and dirty CMDB integration (using BigFix to distribute CMDB data files to each machine and then read the different ones back via properties in analysis) for CMDB system that is currently not supported (!= ServiceNow). To minimize traffic I broke the CMDB data files to one file per computer named with the SerialNo of the machine and I built my own logic to only make the distribution task relevant to machines whose data has recently changed (I have CMDBDataChange client setting that I change via RestAPI to highlight that).
Anyway, the problem I am stuck with is the distribution of those files require dynamic updates with no HASH and without having any data for the files (size, shas) but require relevance substitution to make the same code work for each endpoint. This is the code that I put in my distribution fixlet:
parameter “Repository” = "http://<root_server>:52311/CMDB"
parameter “PrefetchFile” = "{(if (it contains " ") then (concatenation “%2520” of substrings separated by " " of it) else (it)) of (it as trimmed string & “.json”) of (… Code to Evaluate Serial Number…)}"
download now as cmdb.json {(parameter “Repository”) & “/” & parameter “PrefetchFile”}
And it works fine on most machines but since “download now” forces direct download without using relay architecture I have about 10% of the machine that are on networks where they cannot reach the root server where all the download files directly and here comes my problem:
- I tried to change it to “download as” but that command does not support Relevance substitutions (don’t understand why…)
- Tried “add prefetch item” but that forces you to supply Hashes/Sizes and since those data files are changed periodically OUTSIDE of the system (I have a script that checks the CMDB data source, if the data for any machine has changed, it recreates the data file automatically and flags the machine with the client setting described above that a change is required), so that doesn’t work
- Tried with “add nohash prefetch item” but again, that doesn’t support relevance substitutions (again, don’t understand why)
I’ve also explored generating a manifest but for 20k endpoints the manifest itself is 6mb in size and it’s ridiculous to have to download 6mb manifest every hour to accommodate maybe 50 machines having CMDB data changes to then have to download 50 2kb data files… Besides, since the manifest file itself would be changing frequently outside, I think I will have the same problem with the dynamic downloads with no size/hash.
Also, I did try on one machine to actually hardcode the URL with no hash, but what I found out is the “download” command doesn’t seem to be handling changes to the underlying files very well - you download the file now it’s fine, I make a change to the file but since the old file was already cached on relays it just uses that and doesn’t give you any control to re-cache it… Obviously with “download now” that problem with caching doesn’t exist!
Anyway, does anyone have any suggestions of something I may have missed? It seems that such a simple thing and last hurdle type on a long road, and still can’t seem to find a way around it…