����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 216.73.216.45
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/builderbox/www/vendor/rackspace/php-opencloud/doc/_build/html/services/monitoring/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/builderbox/www/vendor/rackspace/php-opencloud/doc/_build/html/services/monitoring/agents.html

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>Agents &mdash; php-opencloud 1.12.1 documentation</title>
  

  
  

  
  <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>

  
  
    

  

  
  
    <link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
  

  
    <link rel="top" title="php-opencloud 1.12.1 documentation" href="../../index.html"/>
        <link rel="up" title="Monitoring v1" href="index.html"/>
        <link rel="next" title="Changelogs" href="changelogs.html"/>
        <link rel="prev" title="Alarms" href="alarms.html"/> 

  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-nav-search">
        <a href="../../index.html" class="fa fa-home"> php-opencloud</a>
        <div role="search">
  <form id ="rtd-search-form" class="wy-form" action="../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>
      </div>

      <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
        
        
            <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../autoscale/index.html">Auto Scale v2</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../autoscale/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../autoscale/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../autoscale/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../autoscale/index.html#further-links">Further Links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../compute/index.html">Compute v2</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../compute/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../compute/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../compute/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../compute/index.html#further-links">Further Links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../database/index.html">Databases v1</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../database/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../database/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../database/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../database/index.html#further-links">Further Links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../dns/index.html">DNS v1</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../dns/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dns/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dns/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../dns/index.html#further-links">Further Links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../identity/index.html">Identity v2</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../identity/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../identity/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../identity/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../identity/index.html#further-links">Further Links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../image/index.html">Images v1</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../image/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../image/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../image/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../image/index.html#further-links">Further Links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../load-balancer/index.html">Load Balancer v1</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../load-balancer/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../load-balancer/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../load-balancer/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../load-balancer/index.html#further-links">Further Links</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Monitoring v1</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="index.html#setup">Setup</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="index.html#further-links">Further links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../networking/index.html">Networking v2</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../networking/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../networking/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../networking/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../networking/index.html#further-links">Further links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../object-store/index.html">Object Store v1</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../object-store/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../object-store/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../object-store/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../object-store/index.html#further-links">Further links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../orchestration/index.html">Orchestration v1</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../orchestration/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../orchestration/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../orchestration/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../orchestration/index.html#further-links">Further links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../queues/index.html">Queues v1</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../queues/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../queues/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../queues/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../queues/index.html#further-links">Further links</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../volume/index.html">Volumes v1</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../volume/index.html#setup">Setup</a></li>
<li class="toctree-l2"><a class="reference internal" href="../volume/index.html#operations">Operations</a></li>
<li class="toctree-l2"><a class="reference internal" href="../volume/index.html#glossary">Glossary</a></li>
<li class="toctree-l2"><a class="reference internal" href="../volume/index.html#further-links">Further links</a></li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../debugging.html">Debugging</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../debugging.html#strategy-1-meaningful-exception-handling">Strategy 1: Meaningful exception handling</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../debugging.html#strategy-2-wire-logging">Strategy 2: Wire logging</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../caching-creds.html">Caching credentials</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../caching-creds.html#filesystem-example">Filesystem example</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../iterators.html">Iterators</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../iterators.html#common-behaviour">Common behaviour</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../iterators.html#very-important-note">Very important note</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../iterators.html#using-paginated-collections">Using paginated collections</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../iterators.html#setting-up-a-paginatediterator">Setting up a PaginatedIterator</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../regions.html">Rackspace regions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../url-types.html">URL types</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../url-types.html#internalurl">internalURL</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../url-types.html#publicurl">publicURL</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../logging.html">Logging</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../logging.html#logger-injection">Logger injection</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../http-clients.html">HTTP Clients</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../http-clients.html#default-http-headers">Default HTTP headers</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../http-clients.html#user-agents">User agents</a></li>
<li class="toctree-l2"><a class="reference internal" href="../../http-clients.html#other-functionality">Other functionality</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../../auth.html">Authentication</a><ul>
<li class="toctree-l2"><a class="reference internal" href="../../auth.html#service-catalog">Service Catalog</a></li>
</ul>
</li>
</ul>

        
      </div>
      &nbsp;
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="../../index.html">php-opencloud</a>
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          <div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="../../index.html">Docs</a> &raquo;</li>
      
          <li><a href="index.html">Monitoring v1</a> &raquo;</li>
      
    <li>Agents</li>
      <li class="wy-breadcrumbs-aside">
        
          <a href="../../_sources/services/monitoring/agents.txt" rel="nofollow"> View page source</a>
        
      </li>
  </ul>
  <hr/>
</div>
          <div role="main">
            
  <div class="section" id="agents">
<h1>Agents<a class="headerlink" href="#agents" title="Permalink to this headline">¶</a></h1>
<p>The Monitoring Agent resides on the host server being monitored. The
agent allows you to gather on-host metrics based on agent checks and
push them to Cloud Monitoring where you can analyze them, use them with
the Cloud Monitoring infrastructure (such as alarms), and archive them.</p>
<p>For more information about this feature, including a brief overview of
its core design principles and security layers, see the <a class="reference external" href="http://docs.rackspace.com/cm/api/v1.0/cm-devguide/content/service-agent.html">official API
documentation</a>.</p>
<div class="section" id="retrieve-details-about-an-agent">
<h2>Retrieve details about an agent<a class="headerlink" href="#retrieve-details-about-an-agent" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$agent</span> <span class="o">=</span> <span class="nv">$service</span><span class="o">-&gt;</span><span class="na">getAgent</span><span class="p">(</span><span class="s1">&#39;{agentId}&#39;</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="list-agents">
<h2>List agents<a class="headerlink" href="#list-agents" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$agents</span> <span class="o">=</span> <span class="nv">$service</span><span class="o">-&gt;</span><span class="na">getAgents</span><span class="p">();</span>

<span class="k">foreach</span> <span class="p">(</span><span class="nv">$agents</span> <span class="k">as</span> <span class="nv">$agent</span><span class="p">)</span> <span class="p">{</span>
   <span class="k">echo</span> <span class="nv">$agent</span><span class="o">-&gt;</span><span class="na">getLastConnected</span><span class="p">();</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="list-connections">
<h2>List connections<a class="headerlink" href="#list-connections" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$connections</span> <span class="o">=</span> <span class="nv">$agent</span><span class="o">-&gt;</span><span class="na">getConnections</span><span class="p">();</span>
</pre></div>
</div>
</div>
<div class="section" id="get-connection">
<h2>Get connection<a class="headerlink" href="#get-connection" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="sd">/** @var \OpenCloud\CloudMonitoring\Resource\AgentConnection */</span>
<span class="nv">$connection</span> <span class="o">=</span> <span class="nv">$agent</span><span class="o">-&gt;</span><span class="na">getConnection</span><span class="p">(</span><span class="s1">&#39;{connectionId}&#39;</span><span class="p">);</span>
</pre></div>
</div>
<p>Once you have access to an agent&#8217;s <tt class="docutils literal"><span class="pre">OpenCloud\CloudMonitoring\Resource\AgentConnection</span></tt>
object, these are the attributes you can access:</p>
<table border="1" class="docutils">
<colgroup>
<col width="43%" />
<col width="57%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Method</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>id</td>
<td><tt class="docutils literal"><span class="pre">getId()</span></tt></td>
</tr>
<tr class="row-odd"><td>guid</td>
<td><tt class="docutils literal"><span class="pre">getGuid()</span></tt></td>
</tr>
<tr class="row-even"><td>agent_id</td>
<td><tt class="docutils literal"><span class="pre">getAgentId()</span></tt></td>
</tr>
<tr class="row-odd"><td>endpoint</td>
<td><tt class="docutils literal"><span class="pre">getEndpoint()</span></tt></td>
</tr>
<tr class="row-even"><td>process_version</td>
<td><tt class="docutils literal"><span class="pre">getProcessVersion()</span></tt></td>
</tr>
<tr class="row-odd"><td>bundle_version</td>
<td><tt class="docutils literal"><span class="pre">getBundleVersion()</span></tt></td>
</tr>
<tr class="row-even"><td>agent_ip</td>
<td><tt class="docutils literal"><span class="pre">getAgentIp()</span></tt></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="agent-tokens">
<h1>Agent tokens<a class="headerlink" href="#agent-tokens" title="Permalink to this headline">¶</a></h1>
<p>Agent tokens are used to authenticate Monitoring agents to the
Monitoring Service. Multiple agents can share a single token.</p>
<div class="section" id="retrieve-an-agent-token">
<h2>Retrieve an agent token<a class="headerlink" href="#retrieve-an-agent-token" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$agentToken</span> <span class="o">=</span> <span class="nv">$service</span><span class="o">-&gt;</span><span class="na">getAgentToken</span><span class="p">(</span><span class="s1">&#39;{tokenId}&#39;</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="create-agent-token">
<h2>Create agent token<a class="headerlink" href="#create-agent-token" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$newToken</span> <span class="o">=</span> <span class="nv">$service</span><span class="o">-&gt;</span><span class="na">getAgentToken</span><span class="p">();</span>
<span class="nv">$newToken</span><span class="o">-&gt;</span><span class="na">create</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Foobar&#39;</span><span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="list-agent-tokens">
<h2>List agent tokens<a class="headerlink" href="#list-agent-tokens" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$agentTokens</span> <span class="o">=</span> <span class="nv">$service</span><span class="o">-&gt;</span><span class="na">getAgentTokens</span><span class="p">();</span>

<span class="k">foreach</span> <span class="p">(</span><span class="nv">$agentTokens</span> <span class="k">as</span> <span class="nv">$token</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">echo</span> <span class="nv">$token</span><span class="o">-&gt;</span><span class="na">getLabel</span><span class="p">();</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="section" id="update-agent-token">
<h2>Update agent token<a class="headerlink" href="#update-agent-token" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$token</span><span class="o">-&gt;</span><span class="na">update</span><span class="p">(</span><span class="k">array</span><span class="p">(</span>
    <span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;New label&#39;</span>
<span class="p">));</span>
</pre></div>
</div>
</div>
<div class="section" id="id1">
<h2>Update agent token<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$token</span><span class="o">-&gt;</span><span class="na">delete</span><span class="p">();</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="agent-host-information">
<h1>Agent Host Information<a class="headerlink" href="#agent-host-information" title="Permalink to this headline">¶</a></h1>
<p>An agent can gather host information, such as process lists, network
configuration, and memory usage, on demand. You can use the
host-information API requests to gather this information for use in
dashboards or other utilities.</p>
<div class="section" id="setup">
<h2>Setup<a class="headerlink" href="#setup" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$host</span> <span class="o">=</span> <span class="nv">$service</span><span class="o">-&gt;</span><span class="na">getAgentHost</span><span class="p">();</span>
</pre></div>
</div>
</div>
<div class="section" id="get-some-metrics">
<h2>Get some metrics<a class="headerlink" href="#get-some-metrics" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$cpuInfo</span>        <span class="o">=</span> <span class="nv">$host</span><span class="o">-&gt;</span><span class="na">info</span><span class="p">(</span><span class="s1">&#39;cpus&#39;</span><span class="p">);</span>
<span class="nv">$diskInfo</span>       <span class="o">=</span> <span class="nv">$host</span><span class="o">-&gt;</span><span class="na">info</span><span class="p">(</span><span class="s1">&#39;disks&#39;</span><span class="p">);</span>
<span class="nv">$filesystemInfo</span> <span class="o">=</span> <span class="nv">$host</span><span class="o">-&gt;</span><span class="na">info</span><span class="p">(</span><span class="s1">&#39;filesystems&#39;</span><span class="p">);</span>
<span class="nv">$memoryInfo</span>     <span class="o">=</span> <span class="nv">$host</span><span class="o">-&gt;</span><span class="na">info</span><span class="p">(</span><span class="s1">&#39;memory&#39;</span><span class="p">);</span>
<span class="nv">$networkIntInfo</span> <span class="o">=</span> <span class="nv">$host</span><span class="o">-&gt;</span><span class="na">info</span><span class="p">(</span><span class="s1">&#39;network_interfaces&#39;</span><span class="p">);</span>
<span class="nv">$processesInfo</span>  <span class="o">=</span> <span class="nv">$host</span><span class="o">-&gt;</span><span class="na">info</span><span class="p">(</span><span class="s1">&#39;processes&#39;</span><span class="p">);</span>
<span class="nv">$systemInfo</span>     <span class="o">=</span> <span class="nv">$host</span><span class="o">-&gt;</span><span class="na">info</span><span class="p">(</span><span class="s1">&#39;system&#39;</span><span class="p">);</span>
<span class="nv">$userInfo</span>       <span class="o">=</span> <span class="nv">$host</span><span class="o">-&gt;</span><span class="na">info</span><span class="p">(</span><span class="s1">&#39;who&#39;</span><span class="p">);</span>

<span class="c1">// What CPU models do we have?</span>
<span class="k">foreach</span> <span class="p">(</span><span class="nv">$cpuInfo</span> <span class="k">as</span> <span class="nv">$cpuMetric</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">echo</span> <span class="nv">$cpuMetric</span><span class="o">-&gt;</span><span class="na">model</span><span class="p">,</span> <span class="nx">PHP_EOL</span><span class="p">;</span>
<span class="p">}</span>

<span class="c1">// How many disks do we have?</span>
<span class="k">echo</span> <span class="nv">$diskInfo</span><span class="o">-&gt;</span><span class="na">count</span><span class="p">();</span>

<span class="c1">// What&#39;s the available space on our ext4 filesystem?</span>
<span class="k">foreach</span> <span class="p">(</span><span class="nv">$filesystemInfo</span> <span class="k">as</span> <span class="nv">$filesystemMetric</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">if</span> <span class="p">(</span><span class="nv">$filesystemMetric</span><span class="o">-&gt;</span><span class="na">sys_type_name</span> <span class="o">==</span> <span class="s1">&#39;ext4&#39;</span><span class="p">)</span> <span class="p">{</span>
        <span class="k">echo</span> <span class="nv">$filesystemMetric</span><span class="o">-&gt;</span><span class="na">avail</span><span class="p">;</span>
    <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="agent-targets">
<h1>Agent targets<a class="headerlink" href="#agent-targets" title="Permalink to this headline">¶</a></h1>
<p>Each agent check type gathers data for a related set of target devices
on the server where the agent is installed. For example,
<tt class="docutils literal"><span class="pre">agent.network</span></tt> gathers data for network devices. The actual list of
target devices is specific to the configuration of the host server. By
focusing on specific targets, you can efficiently narrow the metric data
that the agent gathers.</p>
<div class="section" id="list-agent-targets">
<h2>List agent targets<a class="headerlink" href="#list-agent-targets" title="Permalink to this headline">¶</a></h2>
<div class="highlight-php"><div class="highlight"><pre><span class="nv">$targets</span> <span class="o">=</span> <span class="nv">$service</span><span class="o">-&gt;</span><span class="na">getAgentTargets</span><span class="p">();</span>

<span class="k">foreach</span> <span class="p">(</span><span class="nv">$targets</span> <span class="k">as</span> <span class="nv">$target</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">echo</span> <span class="nv">$target</span><span class="o">-&gt;</span><span class="na">getType</span><span class="p">();</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
</div>


          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="changelogs.html" class="btn btn-neutral float-right" title="Changelogs"/>Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="alarms.html" class="btn btn-neutral" title="Alarms"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2015, Jamie Hannaford, Shaunak Kashyap.
    </p>
  </div>

  <a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
</footer>
        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'../../',
            VERSION:'1.12.1',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true
        };
    </script>
      <script type="text/javascript" src="../../_static/jquery.js"></script>
      <script type="text/javascript" src="../../_static/underscore.js"></script>
      <script type="text/javascript" src="../../_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="../../_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit