Skip to content

Commit

Permalink
Added exporter_scrape_failures_total for all exporters
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Delle Cave committed Jul 5, 2018
1 parent 76730ec commit d584cec
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 23 deletions.
2 changes: 1 addition & 1 deletion bin/covenant
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ __license__ = """
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
__version__ = '0.0.6.28'
__version__ = '0.0.6.29'

# TODO: load Python logging configuration (using standard logging.config)

Expand Down
8 changes: 7 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
covenant (0.0.6.29) unstable; urgency=medium

* Added exporter_scrape_failures_total for all exporters.

-- Adrien Delle Cave <adrien.delle.cave@commandersact.com> Thu, 05 Jul 2018 09:04:50 +0200

covenant (0.0.6.28) unstable; urgency=medium

* Added constants metric types. (const_counter, const_gauge,
Expand All @@ -13,7 +19,7 @@ covenant (0.0.6.27) unstable; urgency=medium

covenant (0.0.6.26) unstable; urgency=medium

* Reviewed apache filter.
* Reviewed apache metrics.

-- Adrien Delle Cave <adrien.delle.cave@commandersact.com> Tue, 03 Jul 2018 15:22:13 +0200

Expand Down
24 changes: 16 additions & 8 deletions etc/covenant/metrics.d/apache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@
uri: ${vars['url']}
format: text
collects:
- up:
on_fail:
value: 0
on_noresult:
value: 0
type: gauge
value: 1
documentation: Could the apache server be reached.
- exporter_scrape_failures_total:
on_fail:
value: 1
on_noresult:
value: 1
type: counter
value: 0
documentation: Number of errors while scraping apache.
- accesses_total:
type: const_counter
value_tasks:
Expand Down Expand Up @@ -33,14 +49,6 @@
pattern: '^CPULoad:\s*([\.0-9]+)$'
flags: MULTILINE
documentation: The current percentage CPU used by each worker and in total by all workers combined (*).
- up:
on_fail:
value: 0
on_noresult:
value: 0
type: gauge
value: 1
documentation: Could the apache server be reached.
- uptime_seconds_total:
type: const_counter
value_tasks:
Expand Down
8 changes: 8 additions & 0 deletions etc/covenant/metrics.d/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
type: gauge
value: 1
documentation: Could the nginx server be reached.
- exporter_scrape_failures_total:
on_fail:
value: 1
on_noresult:
value: 1
type: counter
value: 0
documentation: Number of errors while scraping nginx.
- connections:
type: gauge
labels:
Expand Down
33 changes: 21 additions & 12 deletions etc/covenant/metrics.d/rabbitmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@
- '@filter': jmespath
expression: 'node'
collects:
- up:
labels: ~
on_fail:
value: 0
on_noresult:
value: 0
type: gauge
value: 1
documentation: Could the rabbitmq server be reached.
- exporter_scrape_failures_total:
labels: ~
on_fail:
value: 1
on_noresult:
value: 1
type: counter
value: 0
documentation: Number of errors while scraping rabbitmq.
- connections_total:
type: gauge
value_tasks:
Expand Down Expand Up @@ -58,35 +76,26 @@
- '@filter': jmespath
expression: 'queue_totals.messages_unacknowledged'
documentation: Total number of messages delivered to clients but not yet acknowledged.
- up:
labels: ~
on_fail:
value: 0
on_noresult:
value: 0
type: gauge
value: 1
documentation: Could the rabbitmq server be reached.
- name: exchanges
config:
timeout: ${vars['timeout']}
uri: ${vars['url']}/exchanges
format: ${vars['format']}
collects:
- exchange_messages_published_total:
type: gauge
type: const_counter
value_tasks:
- '@filter': jmespath
expression: 'sum([sum([].message_stats.publish_in), sum([].message_stats.publish_out)])'
documentation: Count of messages published.
- exchange_messages_published_in_total:
type: gauge
type: const_counter
value_tasks:
- '@filter': jmespath
expression: 'sum([].message_stats.publish_in)'
documentation: Count of messages published in to an exchange, i.e. not taking account of routing.
- exchange_messages_published_out_total:
type: gauge
type: const_counter
value_tasks:
- '@filter': jmespath
expression: 'sum([].message_stats.publish_out)'
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
from setuptools import find_packages, setup

version = '0.0.6.28'
version = '0.0.6.29'

current_dir = os.path.abspath(os.path.dirname(__file__))
requirements = [line.strip() for line in open(os.path.join(current_dir, 'requirements.txt'), 'r').readlines()]
Expand Down

0 comments on commit d584cec

Please sign in to comment.