I’m just starting to use EIM and i’m having trouble with archive now…
Already read a lot of docs, and investigated here but still struggling …
So i have create an action that sends some files to a server then executes a shell script that generates a file with the output i want to send back to the EIM server.
The action returns complete 100% but i cannot find the file that should be uploaded to the server in the /var/opt/BESServer/UploadManagerData/BufferDir/sha1/67/15285467/
here is my code :
“
setting “_BESClient_ArchiveManager_OperatingMode”=“2” on “{now}” for client
setting”_BESClient_ArchiveManager_FileSet-send"="/OUT/linux-x86/send/ip.txt" on “{now}” for client
setting “_BESClient_ArchiveManager_SendAll”=“1” on “{now}” for client
In this example the file contains the IP addresses that the server has, but i have several other scripts to execute in servers to “discover” a lot of other information about the servers.
The option to put that info into properties that i can acess via the IEM API would be just perfect, can you give an example how to put that info into a server property ?
There are many properties built in to IEM / BigFix to report on lots of information already.
Here is one to get the IP addresses:
addresses of adapters of networks
Here is a more complicated example:
(friendly name of it, address of it) of adapters whose (address of it as string != "0.0.0.0" AND up of it AND not loopback of it) of network
What other information are you trying to discover?
It really sounds like uploading this file to the root server is the wrong thing to do and you should instead be reading this file with a IEM / BigFix property, particularly if it is a small file
It also seems like most of what are looking for can be done directly with relevance without the need to run anything on the endpoint at all.
Yes, any results in a property or analysis can be queried using the BigFix REST API.
Everything you are looking for either already exists in a property provided by IBM, or an analysis on BigFix.Me or is one that could be written, or through this method:
Anything that cannot be queried natively by BigFix relevance can be accomplished by running something on the command line on a periodic basis, outputting the results to a file, then reading the lines of that file or parts of it using a relevance property. It is ideal if this is not required because it is much better to do it through relevance natively if possible.
Uploading a file to the root server is definitely the wrong approach for this.
I need to come up with a better “real” example, but here is some very rough pseudo code that shows the general process for how to put the output of a command into a file and how to read it with a property.
lines whose("" != it as trimmed string) of files "results_cmd_echo.log"
This will not actually work as is. You need to store the output log somewhere. I highly recommend placing it within the BigFix Client Log folder, the location of which can be determined in a cross platform way using relevance substitution. I also recommend a naming convention similar to what I put above.
Thanks again, a lot of info to study.
Uploading the file isn’t an option an there are a lot of different approaches to put the info in BigFix so that i can extract that info to be used by another tool…
Uploading a file using Archive Now is an option, it just isn’t a good option for what you are trying to accomplish.
Also, uploading using Archive Now will cause the storage to grow on the root server, which is okay if it is needed, but otherwise I would avoid it. It gets messy.