THE ENVIRONMENT VARIABLE ECHOS IN BASH, BUT I'M AW...
# fleet
m
THE ENVIRONMENT VARIABLE ECHOS IN BASH, BUT I'M AWARE BASH ISN'T FLEET. FLEET DOCUMENTATION JUST SAYS SET ENVIRONMENT VARIABLE AND OFFERS NO GUIDANCE BEYOND THAT. I HAVE SET THE ENVIRONMENT VARIABLE AND IT DOESN'T WORK. THAT MAKES ME THINK THAT THE ENVIRONMENT VARIABLE MUST BE SET IN A SPECIAL WAY FOR FLEET TO SEE IT........ YET NO DOCUMENTATION IS PROVIDED FOR US TO SET THE VARIABLE SO FLEET CAN SEE IT......... SIMPLY PUT, HOW THE F DO WE SET THE ENVIRONMENT VARIABLE THAT FLEET WANTS IN UBUNTU?
t
there's no special way to set the variable, it's an env var. If it's not showing software, please provide us with osqueryd logs and fleet serve logs so that we can check further what might be wrong or missing
m
@Tomas Touceda I'm happy to give any log you need, but I can't seem to find any! The osquery agents don't seem to generate any .INFO or .WARNING files and where is fleet log stored I can't find it?
t
how are you running fleet exactly?
m
@Tomas Touceda I have downloaded the binaries and am running it as a systemd service on ubuntu
so I have mysql, redis and fleet all running native in ubuntu, NO DOCKER
t
looking at https://serverfault.com/questions/413397/how-to-set-environment-variable-in-systemd-service, you can set an env var for the service with:
Copy code
systemctl edit fleet
then adding
Copy code
[Service]
Environment="FLEET_BETA_SOFTWARE_INVENTORY=1"
and restarting the service
m
@Tomas Touceda ahhh see! I knew it must have been something like that! Because I had to do something similar with launchd on macOS to get osquery to see the env var I wanted it to see!
r
Thanks @Tomas Touceda for this solution!
👍 1
m
Another mystery solved for mystery inc