Hi All,
I had set up sensu,graphite,sensu client-All works fine.
Now i want to send alerts from sensu.And the checks i am using from sensu-plugins repo.
One of check command is :/usr/bin/env /etc/sensu/plugins/metrics-memory-percent.rb --scheme stats.:::name:::.memory(https://github.com/sensu-plugins/sensu-plugins-memory-checks/tree/master/bin)
sensu-client2.memory_percent.free 6.234994848082251 1455194786
sensu-client2.memory_percent.buffers 5.197360829290261 1455194786
sensu-client2.memory_percent.cached 47.49373753506521 1455194786 sensu-client2.memory_percent.dirty 0.002144504910405648 1455194786 sensu-client2.memory_percent.swapUsed 0.37960228391415635 1455194786 sensu-client2.memory_percent.usedWOBuffersCaches 41.07390678756228 1455194786 sensu-client2.memory_percent.freeWOBuffersCaches 58.92609321243772 1455194786
As the output is in metric format , I am bit dilemma how can this be set with threshold so, i can set alert.
Please help me out.
Thanks in advance
HI All,
I came to know , we have https://github.com/sensu-plugins/sensu-plugins-graphite/blob/master/bin/check-graphite.rb can be used to send alerts from graphite by using graphite’s data.
But I am not sure where and how to create this check/alert .
Request anyone to suggest.
···
On Thursday, February 11, 2016 at 6:27:36 PM UTC+5:30, kumar kittu wrote:
Hi All,
I had set up sensu,graphite,sensu client-All works fine.
Now i want to send alerts from sensu.And the checks i am using from sensu-plugins repo.
One of check command is :/usr/bin/env /etc/sensu/plugins/metrics-memory-percent.rb --scheme stats.:::name:::.memory(https://github.com/sensu-plugins/sensu-plugins-memory-checks/tree/master/bin)
sensu-client2.memory_percent.free 6.234994848082251 1455194786
sensu-client2.memory_percent.buffers 5.197360829290261 1455194786
sensu-client2.memory_percent.cached 47.49373753506521 1455194786 sensu-client2.memory_percent.dirty 0.002144504910405648 1455194786 sensu-client2.memory_percent.swapUsed 0.37960228391415635 1455194786 sensu-client2.memory_percent.usedWOBuffersCaches 41.07390678756228 1455194786 sensu-client2.memory_percent.freeWOBuffersCaches 58.92609321243772 1455194786
As the output is in metric format , I am bit dilemma how can this be set with threshold so, i can set alert.
Please help me out.
Thanks in advance
Have you thought about using the check for the alerting? check-memory.rb which calls check-memory.sh will allow you to set the threshold required for warning and critcal:
check-memory.sh [ -w value -c value -p -h ]
-w --> Warning MB < value
-c --> Critical MB < value
-p --> print out performance data
-h --> print this help screen
and will then alert accordingly using your defined handlers
···
On Thursday, 11 February 2016 12:57:36 UTC, kumar kittu wrote:
Hi All,
I had set up sensu,graphite,sensu client-All works fine.
Now i want to send alerts from sensu.And the checks i am using from sensu-plugins repo.
One of check command is :/usr/bin/env /etc/sensu/plugins/metrics-memory-percent.rb --scheme stats.:::name:::.memory(https://github.com/sensu-plugins/sensu-plugins-memory-checks/tree/master/bin)
sensu-client2.memory_percent.free 6.234994848082251 1455194786
sensu-client2.memory_percent.buffers 5.197360829290261 1455194786
sensu-client2.memory_percent.cached 47.49373753506521 1455194786 sensu-client2.memory_percent.dirty 0.002144504910405648 1455194786 sensu-client2.memory_percent.swapUsed 0.37960228391415635 1455194786 sensu-client2.memory_percent.usedWOBuffersCaches 41.07390678756228 1455194786 sensu-client2.memory_percent.freeWOBuffersCaches 58.92609321243772 1455194786
As the output is in metric format , I am bit dilemma how can this be set with threshold so, i can set alert.
Please help me out.
Thanks in advance
Yes , i thought using check for alert along with handlers.
Here i am sending metric data to graphite from sensu((https://github.com/sensu-plugins/sensu-plugins-memory-checks/tree/master/bin) and not check-memory.rb.
So .for sending alerts i need either use a separate check, such as https://github.com/sensu-plugins/sensu-plugins-memory-checks/blob/master/bin/check-memory.sh or would need to alert from the graphite data using something like "check-graphite"https://github.com/sensu-plugins/sensu-plugins-graphite/blob/master/bin/check-graphite.rb
Using check-memory.rb will be duplicate and hence i need to go with check-graphite.rb.
Request you to suggest the steps.
Thanks in advance
···
On Thursday, February 18, 2016 at 6:55:33 PM UTC+5:30, joel....@nhs.net wrote:
Have you thought about using the check for the alerting? check-memory.rb which calls check-memory.sh will allow you to set the threshold required for warning and critcal:
check-memory.sh [ -w value -c value -p -h ]
-w --> Warning MB < value
-c --> Critical MB < value
-p --> print out performance data
-h --> print this help screen
and will then alert accordingly using your defined handlers
On Thursday, 11 February 2016 12:57:36 UTC, kumar kittu wrote:
Hi All,
I had set up sensu,graphite,sensu client-All works fine.
Now i want to send alerts from sensu.And the checks i am using from sensu-plugins repo.
One of check command is :/usr/bin/env /etc/sensu/plugins/metrics-memory-percent.rb --scheme stats.:::name:::.memory(https://github.com/sensu-plugins/sensu-plugins-memory-checks/tree/master/bin)
sensu-client2.memory_percent.free 6.234994848082251 1455194786
sensu-client2.memory_percent.buffers 5.197360829290261 1455194786
sensu-client2.memory_percent.cached 47.49373753506521 1455194786 sensu-client2.memory_percent.dirty 0.002144504910405648 1455194786 sensu-client2.memory_percent.swapUsed 0.37960228391415635 1455194786 sensu-client2.memory_percent.usedWOBuffersCaches 41.07390678756228 1455194786 sensu-client2.memory_percent.freeWOBuffersCaches 58.92609321243772 1455194786
As the output is in metric format , I am bit dilemma how can this be set with threshold so, i can set alert.
Please help me out.
Thanks in advance
HI All,
Please help me out
···
On Thursday, February 18, 2016 at 7:34:00 PM UTC+5:30, kumar kittu wrote:
Yes , i thought using check for alert along with handlers.
Here i am sending metric data to graphite from sensu((https://github.com/sensu-plugins/sensu-plugins-memory-checks/tree/master/bin) and not check-memory.rb.
So .for sending alerts i need either use a separate check, such as https://github.com/sensu-plugins/sensu-plugins-memory-checks/blob/master/bin/check-memory.sh or would need to alert from the graphite data using something like "check-graphite"https://github.com/sensu-plugins/sensu-plugins-graphite/blob/master/bin/check-graphite.rb
Using check-memory.rb will be duplicate and hence i need to go with check-graphite.rb.
Request you to suggest the steps.
Thanks in advance
On Thursday, February 18, 2016 at 6:55:33 PM UTC+5:30, joel....@nhs.net wrote:
Have you thought about using the check for the alerting? check-memory.rb which calls check-memory.sh will allow you to set the threshold required for warning and critcal:
check-memory.sh [ -w value -c value -p -h ]
-w --> Warning MB < value
-c --> Critical MB < value
-p --> print out performance data
-h --> print this help screen
and will then alert accordingly using your defined handlers
On Thursday, 11 February 2016 12:57:36 UTC, kumar kittu wrote:
Hi All,
I had set up sensu,graphite,sensu client-All works fine.
Now i want to send alerts from sensu.And the checks i am using from sensu-plugins repo.
One of check command is :/usr/bin/env /etc/sensu/plugins/metrics-memory-percent.rb --scheme stats.:::name:::.memory(https://github.com/sensu-plugins/sensu-plugins-memory-checks/tree/master/bin)
sensu-client2.memory_percent.free 6.234994848082251 1455194786
sensu-client2.memory_percent.buffers 5.197360829290261 1455194786
sensu-client2.memory_percent.cached 47.49373753506521 1455194786 sensu-client2.memory_percent.dirty 0.002144504910405648 1455194786 sensu-client2.memory_percent.swapUsed 0.37960228391415635 1455194786 sensu-client2.memory_percent.usedWOBuffersCaches 41.07390678756228 1455194786 sensu-client2.memory_percent.freeWOBuffersCaches 58.92609321243772 1455194786
As the output is in metric format , I am bit dilemma how can this be set with threshold so, i can set alert.
Please help me out.
Thanks in advance
Why is it an issue duplicating the check? You either have a second check querying graphite metrics or you have a check querying the memory. The model of sensu separates out metric collection and checks, with different handlers for both.
Thanks Joel.
Sorry for the late reply.
I am following “create metric analysis check from” https://sensuapp.org/docs/0.20/getting-started-with-checks/ and so bit confused whether to install graphite-api or not for querying the metrics.If yes,then please help me for installing/configuring graphite-api ,as i searched but could not find relevant documents.
Please enlighten .
···
On Wednesday, March 2, 2016 at 3:18:32 PM UTC+5:30, joel....@nhs.net wrote:
Why is it an issue duplicating the check? You either have a second check querying graphite metrics or you have a check querying the memory. The model of sensu separates out metric collection and checks, with different handlers for both.
graphite-api is used if you want to run graphite without the web interface. If you already have graphite installed, you already have the functionality of graphite-api.
For me, the installation is just a matter of doing
apt-get install graphite-api
``
and then pointing to the relevant directories.
···
On Wednesday, 16 March 2016 11:39:15 UTC, kumar kittu wrote:
Thanks Joel.
Sorry for the late reply.
I am following “create metric analysis check from” https://sensuapp.org/docs/0.20/getting-started-with-checks/ and so bit confused whether to install graphite-api or not for querying the metrics.If yes,then please help me for installing/configuring graphite-api ,as i searched but could not find relevant documents.
Please enlighten .
On Wednesday, March 2, 2016 at 3:18:32 PM UTC+5:30, joel....@nhs.net wrote:
Why is it an issue duplicating the check? You either have a second check querying graphite metrics or you have a check querying the memory. The model of sensu separates out metric collection and checks, with different handlers for both.
Thanks Joel.
I guess i need to use pip install graphite-api as yum is not working (saying no package).
Also please confirm the port for graphite-api.
···
On Wednesday, March 16, 2016 at 5:21:20 PM UTC+5:30, joel....@nhs.net wrote:
graphite-api is used if you want to run graphite without the web interface. If you already have graphite installed, you already have the functionality of graphite-api.
For me, the installation is just a matter of doing
apt-get install graphite-api
``
and then pointing to the relevant directories.
On Wednesday, 16 March 2016 11:39:15 UTC, kumar kittu wrote:
Thanks Joel.
Sorry for the late reply.
I am following “create metric analysis check from” https://sensuapp.org/docs/0.20/getting-started-with-checks/ and so bit confused whether to install graphite-api or not for querying the metrics.If yes,then please help me for installing/configuring graphite-api ,as i searched but could not find relevant documents.
Please enlighten .
On Wednesday, March 2, 2016 at 3:18:32 PM UTC+5:30, joel....@nhs.net wrote:
Why is it an issue duplicating the check? You either have a second check querying graphite metrics or you have a check querying the memory. The model of sensu separates out metric collection and checks, with different handlers for both.
HI,
I am getting below error when running :ruby check-graphite-data.rb -s localhost:9001 -t ‘highestCurrent(internal.dev3.*.1.disk-usage.root.used,9)’ -w 18 -c 40 -a 120
Check failed to run: Connection refused - connect(2) for “localhost” port 9001, [“/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/net/http.rb:879:in initialize'", "/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/net/http.rb:879:in
open’”, “/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/net/http.rb:879:in block in connect'", "/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/timeout.rb:75:in
timeout’”, “/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/net/http.rb:878:in connect'", "/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/net/http.rb:863:in
do_start’”, “/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/net/http.rb:852:in start'", "/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/open-uri.rb:313:in
open_http’”, “/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/open-uri.rb:724:in buffer_open'", "/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/open-uri.rb:210:in
block in open_loop’”, “/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/open-uri.rb:208:in catch'", "/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/open-uri.rb:208:in
open_loop’”, “/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/open-uri.rb:149:in open_uri'", "/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/open-uri.rb:704:in
open’”, “/usr/local/rvm/rubies/ruby-2.1.8/lib/ruby/2.1.0/open-uri.rb:34:in open'", "/usr/local/rvm/gems/ruby-2.1.8/gems/sensu-plugins-graphite-0.0.7/lib/sensu-plugins-graphite/graphite_proxy/proxy.rb:87:in
retrieve_data!'”, “check-graphite-data.rb:61:in run'", "/usr/local/rvm/gems/ruby-2.1.8/gems/sensu-plugin-1.2.0/lib/sensu-plugin/cli.rb:56:in
block in class:CLI’”]
Please enlight me.
···
On Wednesday, March 16, 2016 at 5:45:49 PM UTC+5:30, kumar kittu wrote:
Thanks Joel.
I guess i need to use pip install graphite-api as yum is not working (saying no package).
Also please confirm the port for graphite-api.
On Wednesday, March 16, 2016 at 5:21:20 PM UTC+5:30, joel....@nhs.net wrote:
graphite-api is used if you want to run graphite without the web interface. If you already have graphite installed, you already have the functionality of graphite-api.
For me, the installation is just a matter of doing
apt-get install graphite-api
``
and then pointing to the relevant directories.
On Wednesday, 16 March 2016 11:39:15 UTC, kumar kittu wrote:
Thanks Joel.
Sorry for the late reply.
I am following “create metric analysis check from” https://sensuapp.org/docs/0.20/getting-started-with-checks/ and so bit confused whether to install graphite-api or not for querying the metrics.If yes,then please help me for installing/configuring graphite-api ,as i searched but could not find relevant documents.
Please enlighten .
On Wednesday, March 2, 2016 at 3:18:32 PM UTC+5:30, joel....@nhs.net wrote:
Why is it an issue duplicating the check? You either have a second check querying graphite metrics or you have a check querying the memory. The model of sensu separates out metric collection and checks, with different handlers for both.