Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-129

Reloaded SYS variables in cf-monitord

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: cf-monitord
    • Labels:
      None

      Description

      I have heard that you have fixed the hard-class problem on CFEngine daemons when automatically reloaded the policy. How about any kinds of variables? I just bump into this trouble. Please look at the policy below; I used $(sys.uqhost) part of a promiser in monitor bundle.
      <pre>
      bundle monitor watch_sth
      {
      measurements:
      any::
      "/tmp/xxx/$(sys.uqhost)"
      handle => "nmon_cpu_idle",
      stream_type => "file",
      data_type => "real",
      history_type => "weekly",
      units => "Percent",
      match_value => myvalue("CPU_ALL");
      }

      body match_value myvalue(xxx)
      {
      select_line_matching => "^$(xxx).*";
      track_growing_file => "true";
      extraction_regex => "^CPU_ALL,.,.,.,.,(.),,.$";
      }
      </pre>

      The 1st execution was good so far but when cf-monitord tried to resampling data in the next 2.5 minutes. The variable didn't get expanded.

      <pre>

      1. 1st

      cf-monitord> -> Considering promise "nmon_cpu_idle"
      cf-monitord> -> Promise "nmon_cpu_idle" is numerical in nature
      cf-monitord> -> Sampling '/tmp/xxx/localhost' ...(timeout=0,owner=0,group=0)
      cf-monitord> -> Stream "/tmp/xxx/localhost" is a plain file
      cf-monitord> !! Unable to find stream /tmp/xxx/localhost
      cf-monitord> !!! System reports error for stat: "No such file or directory"
      cf-monitord> -> Using slot ob_spare+9 (81) for nmon_cpu_idle
      cf-monitord> Could not locate the line for promise "nmon_cpu_idle"
      cf-monitord> -> Setting Nova slot 81=nmon_cpu_idle to 0.000000

      1. 2nd

      cf-monitord> -> Considering promise "nmon_cpu_idle"
      cf-monitord> -> Promise "nmon_cpu_idle" is numerical in nature
      cf-monitord> -> Sampling '/tmp/xxx/$(sys.uqhost)' ...(timeout=0,owner=0,group=0)
      cf-monitord> -> Stream "/tmp/xxx/$(sys.uqhost)" is a plain file
      cf-monitord> !! Unable to find stream /tmp/xxx/$(sys.uqhost)
      cf-monitord> !!! System reports error for stat: "No such file or directory"
      cf-monitord> -> Using slot ob_spare+9 (81) for nmon_cpu_idle
      cf-monitord> Could not locate the line for promise "nmon_cpu_idle"
      cf-monitord> -> Setting Nova slot 81=nmon_cpu_idle to 0.000000
      </pre>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              a10005 Nakarin Phooripoom (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel