Hi folks, I am still quite new at my new job, but ...
# fleet
j
Hi folks, I am still quite new at my new job, but I got tasked to come up with a solution for for now only a basic inventory. my colleagues alrdy tried GLPI, but I was super unhappy with it and its monolithic approach. It's an jack of all trades solution, but that comes with (a lot of imo) tradeoffs. We liked the "auto discovery" that GLPI has (you install an agent, said agent gets the data from the OS to GLPI. But the scheduler is so bad and it's supert hard to troubleshoot. "Sadly" there are no other open source solutions that offer the full functionallity as GLPI. But there is always build it yourself 😄 So I did some research and stumbled upon OSquery and with that on fleet. Osquery/Fleet look like the perfect fit as a solution to gather data from hosts for our inventory. We have to get one by regulations, but imo it's super important to have a central overview of what should be there. We also need some sort of CMDB, because we are in the financial sector and have to classify "risk classes", so if a certain server, VM etc is used within a process that is critical, we need to (for now manually) put in a risk class. Is there some sort of way to implement a custom field in fleet? Which doesnt get the data from osquery ofc.
k
Hey @Johannes Gedicke! It sounds like you're likely dealing with a relatively small number of hosts, so labels sound like they would do the trick for you!
j
That could do the trick for now! Is there also a way to "manually" assign lables to certain devices? And it would be quite a few lables 😄 A hypervisor running multiple VM will need multiple lables.
k
Yep! You can set up manual labels to apply to any number of hosts:
Copy code
apiVersion: v1
kind: label
spec:
  name: Manually Managed Example
  label_membership_type: manual
  hosts:
    - hostname1
    - hostname2
    - hostname3
There's also some potential for manual labels to be useful here if there's something on the host that would help sort them out... for example, If you have conventions for setting hostnames, you could use a dynamic query like this:
Copy code
apiVersion: v1
kind: label
spec:
  name: VMs
  query: >
    SELECT 1 FROM system_info WHERE hostname LIKE "VM_";
That's a fairly rough sketch, but hopefully the concept conveys 🙂
j
Hi Kathy, didn't see your reply earlier! Oh, it was in the manual after all 😄
I am doing something wrong 😄 Am not super familiar with APIs and didnt know you can also post stuff with YAML. which URL would I have to define to try that out in the sandbox? can I / do I also have to put the auth in the YAML? didnt manage to convert this YAML to JSON. { "name": "testlabelman02", "description": "manual test lable 01", "label_membership_type": "manual", "hosts": "TEST-CLIENT2", "platform": "" } Which returns { "message": "Validation Failed", "errors": [ { "name": "query", "reason": "missing required argument" } ], "uuid": "d8f43969-b3f4-424f-afb1-366918a3d615" }