Skip to content

Commit

Permalink
chore: move installation docs to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
wbollock committed Mar 8, 2023
1 parent 526b40c commit df8e73e
Showing 1 changed file with 44 additions and 44 deletions.
88 changes: 44 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ This exporter does not output Nagios check results as Prometheus metrics; it is

- [nagios\_exporter](#nagios_exporter)
- [Table of Contents](#table-of-contents)
- [Configuration](#configuration)
- [Configuration File](#configuration-file)
- [CLI](#cli)
- [Nagios Core 3/4 support](#nagios-core-34-support)
- [Installation](#installation)
- [Debian/RPM package](#debianrpm-package)
- [Docker](#docker)
- [Binary](#binary)
- [Source](#source)
- [Configuration](#configuration)
- [Configuration File](#configuration-file)
- [CLI](#cli)
- [Nagios Core 3/4 support](#nagios-core-34-support)
- [Grafana](#grafana)
- [Troubleshooting](#troubleshooting)
- [NagiosXI](#nagiosxi)
Expand All @@ -48,6 +48,46 @@ This exporter does not output Nagios check results as Prometheus metrics; it is
- [Releasing](#releasing)
- [Contributors ✨](#contributors-)

## Installation

### Debian/RPM package

Substitute `{{ version }}` for your desired release.

```bash
wget https://github.com/wbollock/nagios_exporter/releases/download/v{{ version }}/prometheus-nagios-exporter_{{ version }}_linux_amd64.{deb,rpm}
{dpkg,rpm} -i prometheus-nagios-exporter_{{ version }}_linux_amd64.{deb,rpm}
```

### Docker

Populate `config.toml` with your `APIKey = NagiosXIAPIKey`

```console
sudo docker run \
-v ./config.toml:/etc/prometheus-nagios-exporter/config.toml \
ghcr.io/wbollock/nagios_exporter \
--nagios.scrape-uri http://localhost
```

### Binary

```bash
wget https://github.com/wbollock/nagios_exporter/releases/download/v{{ version }}/nagios_exporter_{{ version }}_Linux_x86_64.tar.gz
tar xvf nagios_exporter_{{ version }}_Linux_x86_64.tar.gz
./nagios_exporter/prometheus-nagios-exporter
```

### Source

```bash
wget https://github.com/wbollock/nagios_exporter/archive/refs/tags/v{{ version }}.tar.gz
tar xvf nagios_exporter-{{ version }}.tar.gz
cd ./nagios_exporter-{{ version }}
go build nagios_exporter.go
./nagios_exporter.go
```

## Configuration

Create a simple `config.toml` in `/etc/prometheus-nagios-exporter` with your Nagios API key:
Expand Down Expand Up @@ -110,46 +150,6 @@ Example usage:

Note that this flag nullifies all others. It cannot be used in conjunction with the Nagios XI API.

## Installation

### Debian/RPM package

Substitute `{{ version }}` for your desired release.

```bash
wget https://github.com/wbollock/nagios_exporter/releases/download/v{{ version }}/prometheus-nagios-exporter_{{ version }}_linux_amd64.{deb,rpm}
{dpkg,rpm} -i prometheus-nagios-exporter_{{ version }}_linux_amd64.{deb,rpm}
```

### Docker

Populate `config.toml` with your `APIKey = NagiosXIAPIKey`

```console
sudo docker run \
-v ./config.toml:/etc/prometheus-nagios-exporter/config.toml \
ghcr.io/wbollock/nagios_exporter \
--nagios.scrape-uri http://localhost
```

### Binary

```bash
wget https://github.com/wbollock/nagios_exporter/releases/download/v{{ version }}/nagios_exporter_{{ version }}_Linux_x86_64.tar.gz
tar xvf nagios_exporter_{{ version }}_Linux_x86_64.tar.gz
./nagios_exporter/prometheus-nagios-exporter
```

### Source

```bash
wget https://github.com/wbollock/nagios_exporter/archive/refs/tags/v{{ version }}.tar.gz
tar xvf nagios_exporter-{{ version }}.tar.gz
cd ./nagios_exporter-{{ version }}
go build nagios_exporter.go
./nagios_exporter.go
```

## Grafana

Import the [dashboard](grafana/dashboard.json) template ([instructions](https://grafana.com/docs/grafana/v9.0/dashboards/export-import/#import-dashboard)).
Expand Down

0 comments on commit df8e73e

Please sign in to comment.