Unused Relay Report

I’m trying to find a way to identify Relays that are not in use by any Clients. I have a report that displays the multiplicity count of the number of clients per each Relay, but if there are no Clients using specific Relay, the Relay doesn’t show up on the report, so that doesn’t help. Anyone have any ideas?

Is there a file that resides on each Relay that tracks the clients using that Relay, and I could scrub that file to determine the Relay is not in use?

Anyone ?

it looks like …"\BigFix Enterprise\BES Relay\ClientRegisterData\registrationlist.db" exists. Maybe that could be parsed somehow? looks like before IEM v9 it was a flat txt file, but now it is a sqlite file, which really complicates it.

cstoneba,

To get a list of unused relays in session relevance you could do what is listed below… Also the sqllite inspector might be an option if you need to use client side relevance more information below and check here.

        // list of relays
        names of  bes computers whose (relay server flag of it = True)
        //relay the client is pointing to
        values of  results of bes property "relay"  
        // list of relays without children... 
        // list of relays without children... 
elements of (set of (names of bes computers whose (relay server flag of it = True)) - (set of (values of  results of bes property "relay") ) )
    //Sqlite stuff
    q:properties of type  "sqlite database"
    A: encoding of <sqlite database>: string
    A: statement <string> of <sqlite database>: sqlite statement
    A: table <string> of <sqlite database>: sqlite table
    A: tables of <sqlite database>: sqlite table

-jgo

hi jgo thanks for the info, but the “elements…” section doesn’t seem to be working for me, not getting any results. Wouldn’t that session relevance only work if the client’s Relay value = the hostname of the relay? (which wouldn’t be true if any of the Relays are advertising themselves as their FQDN, or if the clients are connecting to the relay via IP instead of DNS).

disregard, i’m seeing results now. still the FQDN/IP != Relay’s hostname is an issue, but i don’t think there’s a away around that.

what type of results are you getting back? hostname/Ip address or all of the above? Why not just put them all in the first set?

// list of relays without children... 
elements of (set of (names of  bes computers whose (relay server flag of it = True);
hostnames of  bes computers whose (relay server flag of it = True); (ip addresses of bes computers whose (relay server flag of it = True)as string)) - (set of (values of  results of bes property "relay") ) )

-jgo

i think adding IPs to the first set will cause a bloat in the Relay count, because now you have a minimum of 2 values for each Relay in the first set.

This is what I have so far that gives good results (Relays where no clients are connecting to the relay by hostname).

<?Relevance

elements of (set of unique values of ( (if (it contains “.”) then preceding text of first “.” of it else it) of hostnames of bes computers whose (relay server flag of it = True) as uppercase) - (set of ((if (it contains “-”) then (preceding texts of firsts “.” of it as string) else it) of preceding texts of firsts “:52311” of (values of results of bes property “Relay” as UPPERCASE))) )

?>

1 Like