Discovery probes - differentiating Linux workstations and servers

David A2
Giga Guru

We are using the OOTB probes, and our classifier doesn't seem to be able to distinguish between Linux servers and Linux workstations. From the logs it looks like it's gathering the OS information from uname-a, but the output doesn't give any of the unique os version info. The documentation seems to say this information can come from either uname -a or cat /etc/*release, the second being the more promising area. Do I need to customize the classifier to get it to look at cat/etc/*release?

https://docs.servicenow.com/bundle/london-it-operations-management/page/product/discovery/reference/...

Data collected

The Linux classifier triggers probes that perform the discovery. Several probes are launched during discovery. See the classifier for a list of the trigger probes.
LabelTable NameField NameSource
Operating Systemcmdb_ci_linux_serverosuname
OS Versioncmdb_ci_computeros_versionuname -a or cat /etc/*release
Short descriptioncmdb_ci_linux_servershort_descriptionuname
Namecmdb_ci_linux_servernameDNS, NBT
Hostnamecmdb_ci_linux_serverhost_nameDNS, NBT
DNS domaincmdb_ci_linux_serverdns_domainDNS
Start datecmdb_ci_linux_serverstart_dateuptime
Manufacturercmdb_ci_computermanufacturerdmidecode
Serial numbercmdb_ci_computerserial_numberdmidecode
1 ACCEPTED SOLUTION

doug_schulze
ServiceNow Employee
ServiceNow Employee

I just explained how to something similar here but for triggering specific probes. In your case, you can take the result and use the value as a classification criteria. But know in our licensing model we consider all Linux OS's as a server os that ticks a license count. If you re-classify a Linux os outside the server class you might get into a grey area in your agreements and should probably have a conversation with your Account Manager for clarification on what can and can't be done in your use case.

View solution in original post

11 REPLIES 11

doug_schulze
ServiceNow Employee
ServiceNow Employee

I just explained how to something similar here but for triggering specific probes. In your case, you can take the result and use the value as a classification criteria. But know in our licensing model we consider all Linux OS's as a server os that ticks a license count. If you re-classify a Linux os outside the server class you might get into a grey area in your agreements and should probably have a conversation with your Account Manager for clarification on what can and can't be done in your use case.

OH forgot something, when looking at my multi-sensor script I'm setting a 'value' so I can call it in the probe condition script, in your case you would actually want to replicate what happens in the ESX multiprobe by setting a classification parameter.

 

function(result, ciData, debug, sensor) {
    var output = result.output;
    if (output === null || gs.nil(output))
        return;

    run(output, ciData, debug);


    function run(output, ciData, debug) {
        if (output.indexOf("<YOUR_LINUX_VALUE>") == -1)
            return;

        var ci_data = ciData.getData();

        if (ci_data.classify_params == undefined)
            ci_data.classify_params = {};

        ci_data.classify_params.<your_parameter> = true;
        ci_data.output += (" " + output);
    }

}		

 

then in the classification criteria it would be <your_parameter> equals true

David A2
Giga Guru

Thanks Doug!

Sue L
Tera Contributor

I have had an long time (Oct 2017) issue that was moved to development regarding the (lack of flexibility) in Linux probe basically.  As it could draw in and say the actual OS for Linux, but one could not do anything with it - such as we do for Mac OS to go to computers (not servers) we have the same issue with Thin Clients - they are computers not servers.  I haven't circled back on this recently, but has this resolved yet that we can better classify?  As our Thin clients are all Ubuntu and our Linux Servers are all Red Hat.    

Please discuss if this is resolved in recent versions, thanks.