<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <font face="Calibri">If we could just use existing metrics to make
      the determination we could avoid the TTL issue, I think.   If we
      went with something like below I'd just suggest a single metric
      definition with a tag for each server name.  Do metric defs suffer
      from TTL?</font><br>
    <br>
    <div class="moz-cite-prefix">On 3/27/2017 11:36 PM, John Sanda
      wrote:<br>
    </div>
    <blockquote
      cite="mid:BFA46AC8-B765-444E-AB44-5EF6CFD762B6@redhat.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      My first thought was a string metric where data points are the
      servers that get discovered. There are a couple things though that
      I do not like about this. First, all data point queries in
      hawkular-metrics have a date range. Having to use a date range
      here seems a bit awkward. Secondly all data points in
      hawkular-metrics expire. These does not seem like data that we
      would want to expire.
      <div class=""><br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On Mar 27, 2017, at 5:02 PM, Jay Shaughnessy
              &lt;<a moz-do-not-send="true"
                href="mailto:jshaughn@redhat.com" class="">jshaughn@redhat.com</a>&gt;
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <meta content="text/html; charset=windows-1252"
                http-equiv="Content-Type" class="">
              <div bgcolor="#FFFFFF" text="#000000" class=""> <br
                  class="">
                i was thinking, perhaps it's not even necessary to
                involve inventory to know if the server was reported or
                not.  We define metrics, like avail, for these root
                types, I think.  At startup if the metric existed
                perhaps you could assume it was already reported,
                otherwise you could send a "new server" event.  Would
                that approach fly or be easier?<br class="">
                <br class="">
                <div class="moz-cite-prefix">On 3/27/2017 12:40 PM, Joel
                  Takvorian wrote:<br class="">
                </div>
                <blockquote
cite="mid:CAJo5TFmTXA_qN_z9=3hMx4dy0L=GEabqAkdHNb+Tity_6vWV=A@mail.gmail.com"
                  type="cite" class="">
                  <div dir="ltr" class="">For point 1., we can probably
                    use some functions I wrote in the integration tests,
                    see there: <a moz-do-not-send="true"
href="https://github.com/jotak/hawkular-agent/blob/inventory-strings/hawkular-agent-itest-util/src/main/java/org/hawkular/agent/itest/util/ITestHelper.java"
                      class="">https://github.com/jotak/hawkular-agent/blob/inventory-strings/hawkular-agent-itest-util/src/main/java/org/hawkular/agent/itest/util/ITestHelper.java</a>
                    <div class=""><br class="">
                    </div>
                    <div class="">I assume you can build a canonical
                      path? (The same "canonical path" than in the
                      existing inventory) If so, the method "<span style="color:rgb(121,93,163);font-family:sfmono-regular,consolas,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:12px;white-space:pre" class="">getBlueprintFromCP" </span>gives
                      it to you as an Optional blueprint.</div>
                  </div>
                  <div class="gmail_extra"><br class="">
                    <div class="gmail_quote">On Mon, Mar 27, 2017 at
                      5:00 PM, John Mazzitelli <span dir="ltr" class="">&lt;<a
                          moz-do-not-send="true"
                          href="mailto:mazz@redhat.com" target="_blank"
                          class="">mazz@redhat.com</a>&gt;</span> wrote:<br
                        class="">
                      <blockquote class="gmail_quote" style="margin:0 0
                        0 .8ex;border-left:1px #ccc
                        solid;padding-left:1ex">&lt;tl;dr&gt;<br
                          class="">
                        <br class="">
                        Need ideas on how we are to implement the
                        following two things in the agent:<br class="">
                        <br class="">
                        1. At startup, agent needs to ask H-Metrics
                        "what top-level servers have I told you about in
                        an earlier life?"<br class="">
                        <br class="">
                        2. When a new server is discovered, the agent
                        should send an event to the server about the new
                        server EXCEPT if the server isn't really new at
                        all (see 1. above)<br class="">
                        <br class="">
                        &lt;/tl;dr&gt;<br class="">
                        <br class="">
                        <br class="">
                        ===<br class="">
                        <br class="">
                        <br class="">
                        This post is to open up a discussion on how we
                        want to implement a new features in the agent.<br
                          class="">
                        <br class="">
                        Joel is developing a new "inventory in metrics"
                        feature: <a moz-do-not-send="true"
                          href="https://github.com/hawkular/hawkular-agent/pull/303"
                          rel="noreferrer" target="_blank" class="">https://github.com/hawkular/<wbr
                            class="">hawkular-agent/pull/303</a><br
                          class="">
                        <br class="">
                        This means the agent will be storing inventory
                        directly into Hawkular-Metrics. Because of this,
                        we need to figure out how to get events sent
                        based on things happening in H-Metric's
                        inventory so MiQ can do things with it (like put
                        things in the timeline such as "new server
                        discovered" or "new WAR was deployed").<br
                          class="">
                        <br class="">
                        Jay looked at the code and the only thing that
                        would be "missing" after this move of inventory
                        into metrics is an event triggered when a new
                        server is added to inventory. (When a new
                        deployment is added, or a deployment is removed,
                        the server is looking at command responses and
                        generating events from that - so we don't lose
                        anything by moving inventory into metrics).<br
                          class="">
                        <br class="">
                        By "new server", what we mean is a new resource
                        that has no parent resources (i.e. a "root
                        resource"). This includes standalone WildFly
                        Servers and domain Host Controllers.<br class="">
                        <br class="">
                        Right now, the agent starts with a "clean slate"
                        when it starts up for the first time, or
                        restarts. That means the agent's in-memory
                        inventory graph is completely empty at startup -
                        when discovery is run, the agent's internal
                        inventory graph is filled in. After that, the
                        agent just keeps the inventory graph up to date
                        as it discovers new things coming and old things
                        going away.<br class="">
                        <br class="">
                        We need the agent to know if it already stored
                        its top level servers into H-Metrics inventory
                        and if it did, not to generate any "new server
                        event". But if the agent is brand new, and it
                        never sent any top-level resources to H-Metrics
                        inventory yet, it should now send a "new server"
                        event to the server (the agent never sent events
                        like this before).<br class="">
                        <br class="">
                        So there are two new things (assuming we keep
                        the stuff Joel is doing - that is, we store
                        inventory into H-Metrics):<br class="">
                        <br class="">
                        1. At startup, agent needs to ask H-Metrics
                        "what top-level servers have I told you about in
                        an earlier life?"<br class="">
                        <br class="">
                        2. When a new server is discovered, the agent
                        should send an event (whatever this means -
                        probably a REST API call somewhere) about the
                        new server EXCEPT if the server isn't really new
                        at all (see 1. above)<br class="">
                        <br class="">
                        We need to figure out how to implement 1. and 2.
                        So we are soliciting thoughts on those two
                        subjects.<br class="">
                        ______________________________<wbr class="">_________________<br
                          class="">
                        hawkular-dev mailing list<br class="">
                        <a moz-do-not-send="true"
                          href="mailto:hawkular-dev@lists.jboss.org"
                          class="">hawkular-dev@lists.jboss.org</a><br
                          class="">
                        <a moz-do-not-send="true"
                          href="https://lists.jboss.org/mailman/listinfo/hawkular-dev"
                          rel="noreferrer" target="_blank" class="">https://lists.jboss.org/<wbr
                            class="">mailman/listinfo/hawkular-dev</a><br
                          class="">
                      </blockquote>
                    </div>
                    <br class="">
                  </div>
                  <br class="">
                  <fieldset class="mimeAttachmentHeader"></fieldset>
                  <br class="">
                  <pre class="" wrap="">_______________________________________________
hawkular-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hawkular-dev">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a>
</pre>
                </blockquote>
                <br class="">
              </div>
              _______________________________________________<br
                class="">
              hawkular-dev mailing list<br class="">
              <a moz-do-not-send="true"
                href="mailto:hawkular-dev@lists.jboss.org" class="">hawkular-dev@lists.jboss.org</a><br
                class="">
              <a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hawkular-dev">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a><br
                class="">
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
hawkular-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:hawkular-dev@lists.jboss.org">hawkular-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/hawkular-dev">https://lists.jboss.org/mailman/listinfo/hawkular-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>