Bible Signs Announcing the End of the World! The apocalypse will come in the most unexpected way possible

Christians around the world know that there are certain prophecies in the Bible that foretell the Apocalypse! What are the signs of the end of the world? Some believers believe that the Apocalypse is…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Customized metrics in CollectD with Ansible

CollectD as a famous monitoring tool not only extracts the metrics of system or application itself but also can help you to customize any figure into the pipeline. We will go through a real case.

CollectD enables the extensibility by plugins. There are plants of plugins [on the table][1]. We will focus on one of them, [Exec plugin][1].

There are a couple of arguments that can along with the script path. Execution user and script arguments.

Your script must echo the figure as a specific format, so-called [Plain Text Protocol][3]. It’s a text-based format to present your metrics data. Here is an example.

The metrics name could have a slash sign as a delimiter. Regarding the metrics name, it depends on what storage you are using. It will reflex in your storage schema. In our case, we have [an InfluxDB as the backend storage][4]. The metrics name will dive into the following parts.

And then we need to point out the interval and value or values if you have multiple. Please refer to the plain text protocol about the metrics type.

We can initiate a playbook like below. If you don’t familiar with the specification, it’s a YAML based statement file. All about the tasks and could be dedicated to what should be done by which module name you called.

We are a jar package to generate the metrics data, which is in the CSV format. And we need a Systemd unit file for the general management purpose. And then we place the script that we need to convert the CSV metrics file to plain text protocol format data as stdout to collectD. We finally create a collectD config file to enable the script.

One tricky here is the handles. We defined a service restart task as a reaction if there is something changed, which is a big concept in state management. But now all we need to know is, we don’t want to restart collectD every time when we execute this playbook.

Add a comment

Related posts:

Why Avoiding White Lies Will Save You Pain and Give You Freedom

It was a shock. At first, I said I didn’t do it. My parents were not like the rest of the Turkish parents; they weren’t overly strict or controlling. I had no reason to lie to them. But then I…

EBC

My vision for the enterprise blockchain computing industry is there will be an interoperable network of computers around the world that are made up of different crypto and blockchain protocols…

As 40 melhores ferramentas digitais para escritores

Uma lista com diversas ferramentas para escritores