Free BSD discovery?

lada
Kilo Contributor

Hallo,

Does discovery discover FreeBSD servers?

Thanks,

Lada

14 REPLIES 14

Amit Sharma4
Mega Expert

Hi Tim,


Attached is the log.


In ECC Queue is finds port is opened and shows banner text as "SSH-2.0-OpenSSH_5.1p1 FreeBSD-20080901". Log.png



Thanks !~ Amit


Ok, so it found port 22 open on the machine, and I guess it looks like it logged in successfully - "vmware: not found" doesn't sound like it failed to login.



We could confirm a little more by looking in the ECC queue at the classify probe input.



So, this is totally amateur hour, but I tried it myself. (Spoiler - the story ends with me giving up and going back to work, but you may find it somewhat informative.) I downloaded a VM image of a FreeBSD system, fired it up, untangled the network issues, and discovered it.



I got the same results you did - 4 ecc queue records: Shazzam out and in, Unix classify out and in.



So, I looked at Unix under   where I see how we decide what Unix servers are what. There is a series of classifiers that look at the name of the OS and based on that classify.



I copied the AIX logic:


  1. I added a table, cmdb_ci_bsd_server parallelling cmdb_ci_aix_server.
  2. In Discovery Definition / CI Classification / Unix, I added an entry like the AIX entry referring to the table above. I should also add a list of probes to run here, but I was too lazy.
  3. In the "UNIX - Classify" sensor's getOSType function, I added a conditional to map "FreeBSD" in the os name to "BSD" (which is derived in the "UNIX - OS" multiprobe subsensor of "UNIX Classify" based on the first field of the uname -a results)

After all this, I expect it to just up and classify the thing and then do nothing.



That doesn't happen. I just get the same 4 ECC queue entries as before.



I'm sure I could debug this in time, but I've spent as much time as I can afford on an educational experiment for today.



Amateur hour is over. Time for the pro to step in. @Doug Schulze - show us how it's done.


    - Tim.


So what you are seeing is that the classification parameter isn't catching any of the classifiers.. so Lets see what is coming back.. in sys_properties add a value of :  



glide.discovery.debug.classification , type: true/false , value: true



Then run a discovery against the machine.. check your logs as I outline here , the post the output of your debug logs and we can see what we should be triggering on!


Amit Sharma4
Mega Expert

Thanks a lot Tim for this effort. Let's see what Doug has to say.


Also, if you can post your Unix Classify XML input that can help as well, not as well as the debug log but will certainly be valuable