Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasmhughes committed Jan 1, 2024
2 parents 56a5f69 + 278e31d commit bfd4f0b
Show file tree
Hide file tree
Showing 6 changed files with 361 additions and 21 deletions.
44 changes: 24 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,50 @@ This project uses [Semantic Versioning](https://semver.org/) - MAJOR.MINOR.PATCH

# Changelog

Saltext.Prometheus 2.0.1 (2023-03-12)
=====================================
# Saltext.Prometheus 2.0.3 (2023-08-14)

Fixed
-----
### Fixed

- Fix salt deps by removing them (#22)


# Saltext.Prometheus 2.0.2 (2023-03-13)

### Fixed

- Fix mode set to int octal instead of octal notation (#21)


# Saltext.Prometheus 2.0.1 (2023-03-12)

### Fixed

- Fix KeyError thrown when requiring state is not run (#20)


Saltext.Prometheus 2.0.0 (2022-10-13)
=====================================
# Saltext.Prometheus 2.0.0 (2022-10-13)

Added
-----
### Added

- Add ability to use prometheus_client library (#2)


Saltext.Prometheus 1.1.1 (2022-05-04)
=====================================
# Saltext.Prometheus 1.1.1 (2022-05-04)

Added
-----
### Added

- Hide raw version numbers to normalize data on release version (#6)


Saltext.Prometheus 1.0.1 (2022-03-18)
=====================================
# Saltext.Prometheus 1.0.1 (2022-03-18)

Fixed
-----
### Fixed

- Fix textfile output to view None result as success (#3)


Saltext.Prometheus 1.0.0 (2022-01-29)
=====================================
# Saltext.Prometheus 1.0.0 (2022-01-29)

Added
-----
### Added

- Initial version of Prometheus Text Exposition Format Returner
14 changes: 14 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@

Salt Extension for interacting with Prometheus

This guide will walk you through the process of installing and setting up the Prometheus Salt extension on your machine.


What is Prometheus Salt Extension?
==================================

The Prometheus Salt Extension is a Salt extension module that provides features and functionality realated to Prometheus for easy plugin capabilities.


Contents
--------

.. toctree::
:maxdepth: 2
:caption: Guides
:hidden:

topics/installation
quick_start
user_documentation

.. toctree::
:maxdepth: 2
Expand Down
102 changes: 102 additions & 0 deletions docs/quick_start.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
Quick Start Guide
=================

This guide will show you how to get started running the Prometheus Salt extension.


Before You Start
----------------

Ensure Salt 3005 or above is installed and running on your machine.

If you haven't installed Salt yet, refer to the `Salt Installation Guide <https://docs.saltproject.io/salt/install-guide/en/latest>`_


Installing the Extension
------------------------

Several methods are available for installing the Prometheus Salt extension:

- **Method 1: Using pip**

.. code-block::
pip install saltext-prometheus
.. note::
Depending on the Salt version, Salt may not be using the system Python. For those versions, ensure you're using the Python associated with Salt (typically found at **/opt/saltstack/salt/bin/python**).


- **Method 2: Using Salt**

Use an execution module like:

.. code-block::
salt \* pip.install saltext-prometheus
Note: The extension can be installed and used on all minions or specific minions where reporting data is needed


Verify Installation - (Optional)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Verify that the extension is installed

.. code-block::
salt --versions-report
You should see `saltext.prometheus` listed under Salt extensions.


Getting Started
---------------

After successfully installing the extension, you are prepared to execute Prometheus Salt extension modules.

.. raw:: html

<br />

**Example:** Apply a test state using the prometheus_textfile as the returner

Create a test.sls file in directory /srv/salt

/srv/salt/test.sls

.. code-block:: yaml
/tmp/dummy.text:
file.managed:
- contents: |
helloworld
Execute the following command

.. code-block::
salt \* state.apply test --return prometheus_textfile
You should see an output file created on the minion machine (default location: **/var/cache/salt/minion/prometheus_textfile/salt.prom**).

**Example output file:**

.. code-block::
salt_last_completed 1.698364953e+09
# HELP salt_version Version of installed Salt package
# TYPE salt_version gauge
salt_version 3006.3
# HELP salt_version_tagged Version of installed Salt package as a tag
# TYPE salt_version_tagged gauge
salt_version_tagged{salt_version="3006.3"} 1.0
Additional Resources
--------------------

For more detailed information on functionality, use cases, and configuration, please vist our :ref:`user-documentation`
Loading

0 comments on commit bfd4f0b

Please sign in to comment.