Topic
  • 12 replies
  • Latest Post - ‏2014-01-03T16:58:17Z by kapax00
TJessee
TJessee
12 Posts

Pinned topic Number of Endpoints Reporting to a Relay

‏2013-06-13T19:17:58Z |

I am trying to create a report that will allow me to display the Relay and then the number of Endponts that relay has reporting to it.  Is this even possible?

  • Lee Wei
    Lee Wei
    599 Posts
    ACCEPTED ANSWER

    Re: Number of Endpoints Reporting to a Relay

    ‏2013-06-13T21:34:47Z  

    Here is a simple but fully functional custom report as a starting example for you.

    Let me know if you need help.

    <?relevance

    ( html "<table border=1 style=%22border-collapse; collapse; border: medium none; %22>" &     
      html ("<th>Relay</th><th>Number of Clients</th>") & it & html "</table>"
    ) of concatenations of
    trs of (td of it & td "align=right" of (multiplicity of it as string)) of
    unique values of relay servers of bes computers

    ?>

     

     

     

    Updated on 2013-06-13T21:37:53Z at 2013-06-13T21:37:53Z by Lee Wei
  • Lee Wei
    Lee Wei
    599 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2013-06-13T21:34:47Z  

    Here is a simple but fully functional custom report as a starting example for you.

    Let me know if you need help.

    <?relevance

    ( html "<table border=1 style=%22border-collapse; collapse; border: medium none; %22>" &     
      html ("<th>Relay</th><th>Number of Clients</th>") & it & html "</table>"
    ) of concatenations of
    trs of (td of it & td "align=right" of (multiplicity of it as string)) of
    unique values of relay servers of bes computers

    ?>

     

     

     

    Updated on 2013-06-13T21:37:53Z at 2013-06-13T21:37:53Z by Lee Wei
  • TJessee
    TJessee
    12 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2013-07-01T12:49:58Z  
    • Lee Wei
    • ‏2013-06-13T21:34:47Z

    Here is a simple but fully functional custom report as a starting example for you.

    Let me know if you need help.

    <?relevance

    ( html "<table border=1 style=%22border-collapse; collapse; border: medium none; %22>" &     
      html ("<th>Relay</th><th>Number of Clients</th>") & it & html "</table>"
    ) of concatenations of
    trs of (td of it & td "align=right" of (multiplicity of it as string)) of
    unique values of relay servers of bes computers

    ?>

     

     

     

    Lee,

    That report worked perfectly.  Thank you very much for the quick response. 

  • MBARTOSH
    MBARTOSH
    12 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2013-07-02T17:57:06Z  
    • TJessee
    • ‏2013-07-01T12:49:58Z

    Lee,

    That report worked perfectly.  Thank you very much for the quick response. 

    I would like a report like this but number of relay per location. 

  • VipulSri
    VipulSri
    6 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2013-10-01T08:11:48Z  
    • Lee Wei
    • ‏2013-06-13T21:34:47Z

    Here is a simple but fully functional custom report as a starting example for you.

    Let me know if you need help.

    <?relevance

    ( html "<table border=1 style=%22border-collapse; collapse; border: medium none; %22>" &     
      html ("<th>Relay</th><th>Number of Clients</th>") & it & html "</table>"
    ) of concatenations of
    trs of (td of it & td "align=right" of (multiplicity of it as string)) of
    unique values of relay servers of bes computers

    ?>

     

     

     

    Hello Lee,

     

    This session relevance seems to give an output where a Relay has some endpoints reporting to it, if there is no endpoint report to the relay then that relay is not coming in the list.

    Is there a way to get the other relays which do not have any endpoints reporting to it in this list?

     

    Thanks

    Vipul

  • cstoneba
    cstoneba
    182 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2013-10-02T14:59:28Z  
    • VipulSri
    • ‏2013-10-01T08:11:48Z

    Hello Lee,

     

    This session relevance seems to give an output where a Relay has some endpoints reporting to it, if there is no endpoint report to the relay then that relay is not coming in the list.

    Is there a way to get the other relays which do not have any endpoints reporting to it in this list?

     

    Thanks

    Vipul

    same question for me. this would be helpful in identifying Relays that are not being utilized.

     

  • cstoneba
    cstoneba
    182 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2013-10-17T15:05:25Z  
    • cstoneba
    • ‏2013-10-02T14:59:28Z

    same question for me. this would be helpful in identifying Relays that are not being utilized.

     

    anyone?

  • MaherBA
    MaherBA
    4 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2013-12-04T09:30:46Z  
    • Lee Wei
    • ‏2013-06-13T21:34:47Z

    Here is a simple but fully functional custom report as a starting example for you.

    Let me know if you need help.

    <?relevance

    ( html "<table border=1 style=%22border-collapse; collapse; border: medium none; %22>" &     
      html ("<th>Relay</th><th>Number of Clients</th>") & it & html "</table>"
    ) of concatenations of
    trs of (td of it & td "align=right" of (multiplicity of it as string)) of
    unique values of relay servers of bes computers

    ?>

     

     

     

    Hello all,

    Please tell me how can i use the same relevance but to create a property in IEM to know how number of clients per relay?

    Per advance, thanks.

  • TJessee
    TJessee
    12 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2014-01-02T15:37:32Z  
    • MaherBA
    • ‏2013-12-04T09:30:46Z

    Hello all,

    Please tell me how can i use the same relevance but to create a property in IEM to know how number of clients per relay?

    Per advance, thanks.

    MetalMan,

    In the Console,  If you expand Computers, then expand By Retrieved Properties then expand  By Relay.  It gives a number of endpoints reporting to the relay.

     

    Hope that helps, quick but dirty.

  • MaherBA
    MaherBA
    4 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2014-01-02T15:53:04Z  
    • TJessee
    • ‏2014-01-02T15:37:32Z

    MetalMan,

    In the Console,  If you expand Computers, then expand By Retrieved Properties then expand  By Relay.  It gives a number of endpoints reporting to the relay.

     

    Hope that helps, quick but dirty.

    Hi TJessee,

    Thank you for your answer. I do the same thing to find it :) 

    I wanted to define a property to add it in my relays alanysis to calculate it properly.

    Best regards

  • kapax00
    kapax00
    5 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2014-01-02T23:04:00Z  
    • MaherBA
    • ‏2014-01-02T15:53:04Z

    Hi TJessee,

    Thank you for your answer. I do the same thing to find it :) 

    I wanted to define a property to add it in my relays alanysis to calculate it properly.

    Best regards

    MetalMan,

    the problem is that both console and WebReports are using "session relevance", that is evaluated based on the IEM database content, while the agent properties are retrieved with agent's relevance, that is evaluated inspecting data/information local to the endpoint(s).

    You would have to "calculate" the number of reporting endpoints on all the relays with some mechanisms. While this may be possible by extracting some information from the relay files, the possibility to have inconsistent results is depending on the stability of your network topology (for instance an endpoint may be "moving" from one relay to another.. and you may count it twice on different relays depending on the timing).

    The key file to obtain the information about reporting endpoints on a relay would be the file:

    <Relay InstallDataPath>\ClientRegisterData\registrationlist.db

    In version 8.x and previous this file was a flat text file, but since version 9.x it has been changed into a sqlite db file.

    In principle you could have a fixlet to periodically run a sql query to output the count of "currently" registered/active endpoints of the relay on a file and read it with the standard agent's relevance.

    I'm not sure what is the format of the timestamp used in the registration list and what filtering would be really meaningful.

    I hope this helps..

     

  • MaherBA
    MaherBA
    4 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2014-01-03T09:36:42Z  
    • kapax00
    • ‏2014-01-02T23:04:00Z

    MetalMan,

    the problem is that both console and WebReports are using "session relevance", that is evaluated based on the IEM database content, while the agent properties are retrieved with agent's relevance, that is evaluated inspecting data/information local to the endpoint(s).

    You would have to "calculate" the number of reporting endpoints on all the relays with some mechanisms. While this may be possible by extracting some information from the relay files, the possibility to have inconsistent results is depending on the stability of your network topology (for instance an endpoint may be "moving" from one relay to another.. and you may count it twice on different relays depending on the timing).

    The key file to obtain the information about reporting endpoints on a relay would be the file:

    <Relay InstallDataPath>\ClientRegisterData\registrationlist.db

    In version 8.x and previous this file was a flat text file, but since version 9.x it has been changed into a sqlite db file.

    In principle you could have a fixlet to periodically run a sql query to output the count of "currently" registered/active endpoints of the relay on a file and read it with the standard agent's relevance.

    I'm not sure what is the format of the timestamp used in the registration list and what filtering would be really meaningful.

    I hope this helps..

     

    Hello Kapax00,

    Thank you very much for this information. Yes it helps :)

    Best regards

  • kapax00
    kapax00
    5 Posts

    Re: Number of Endpoints Reporting to a Relay

    ‏2014-01-03T16:58:17Z  
    • MaherBA
    • ‏2014-01-03T09:36:42Z

    Hello Kapax00,

    Thank you very much for this information. Yes it helps :)

    Best regards

    MetalMan,

    for your info I narrowed down a sqlite query that outputs the endpoints that have registered with the Relay  in the last 24 hours.

    assuming that you have sqlite available this is activated interactively by:

    sqlite3 registrationlist.db

    .mode column

    .width 10 10 20 20

    select ComputerID,ParentID, strftime('%s', 'now') - RegistrationTime as Age,IPAddress from COMPUTER_REGISTRATIONS where Age < 86400 order by Age

    there is a way to run it also as a batch command

    Bye