Skip to Content

From the Virtyx Blog

Tech Focus: Bi-Directional Agent

By Ben Burwell • October 19, 2018

To anyone who has spent time working with monitoring tools, an agent is not a new concept. The tried and tested monitoring pipeline typically involves a small piece of software that runs on all the devices you’re interested in monitoring and collects relevant system information. These metrics need to eventually end up in a central location to be useful, whether that’s through a push or a pull method (for example, StatsD pushes measurements to a server over UDP while Prometheus makes its latest metrics available for collection by exposing an HTTP endpoint).

Legacy monitoring products use agents that only communicate metrics, relying on out-of-band mechanisms for updating the monitoring configuration. While there are tools that can simplify this process, the inability to dynamically reconfigure monitoring systems can result in lost time when it’s most critical.

When we developed the Virtyx agent, we knew it was important for the monitoring system to be able to communicate its needs back to the agent. With the growing complexity of modern software stacks, it’s not always possible to predict which specific metrics may be most helpful to diagnosing issues, and even if it was possible to make a list of every possibly relevant metric, collecting all of them at a high frequency puts undesirable strain on your compute and network resources. By enabling the monitoring system to dynamically indicate to the sensor network (agents) which metrics need to be collected, you can get the best of both worlds: detailed, relevant metrics at a moment’s notice without the overhead of continuous high-frequency collection.

With bi-directional communication, the monitoring system can move a step even further into actually resolving issues that arise. In addition to sending agents metrics to collect, the monitoring system can instruct agents to perform a wide range of other functions from restarting services to checking network status or reachability.

Within Virtyx, all of the tasks that can be performed are defined as agent plugins. Our agent is simply a means for the monitoring system to collect data and carry out tasks on remote systems while being agnostic about how those functions are carried out. Our fundamental abstraction is the Task, which defines which plugin to run, how often to run it (possibly just once), and what parameters the agent should run it with.

Plugins are simply executable binaries that are launched by the agent and thus can be written in many languages. They can receive configuration parameters through standard input, and any results printed to standard output are reported by the agent back to the monitoring system.

The agent checks for new tasks when it sends its heartbeat every 15 seconds. If new tasks have been assigned to the agent in the monitoring system, they are immediately started. The agent also establishes a websocket connection to the monitoring system which enables single-run tasks to be sent in response to actions taken in the monitoring system’s user interface.

By implementing two-way communication between the agent and the monitoring system, we provide our customers not just with monitoring tools, but with the ability to truly diagnose and resolve issues when they arise more quickly than would otherwise be possible.

You can start reaping the benefits of using Virtyx by signing up now — your first five agents are always free. If what we’re doing sounds interesting, come join our team! We’re hiring in Boston. You can also take a look through some more practical information about the Virtyx agent on our documentation site.


Come join our team - we're hiring!

Get Started for Free
Read More

By Ben Burwell • October 22, 2018

By Jim Maniscalco • September 27, 2018

By Ethan Mick • September 20, 2018

By Jim Maniscalco • September 14, 2018

By Ben Burwell • September 13, 2018

Start using Virtyx today.

If you manage computers or servers, Virtyx can make your life easier.