Skip to content

Commit

Permalink
Doc for docker environment
Browse files Browse the repository at this point in the history
refs #4
  • Loading branch information
mxhash committed Apr 12, 2019
1 parent e080607 commit 05cb3a1
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ make install
(see also check_interface --help)

check_interface -c public -h 192.168.0.1 -r 'FastEth' -p '$SERVICEPERFDATA$' -t $LASTSERVICECHECK$ -a

Options;
-h address of device

-c|--community community (default public)
-r|--regex interface list regexp
Regex to match interfaces (important, this is a Regular Expression
Expand Down Expand Up @@ -122,3 +122,30 @@ Examples;
If unsure of a pattern, you should test it on the command line thus;

check_interface -c public -h 192.168.0.1 -r 'Eth(0|2)$'

### Docker Build Environment

You can use docker for a development environment.

**Usage:**

Simple use:

```sh
docker build -t check_interfaces .
docker run --rm check_interfaces -c public -h sw1
```

Persistent container

```sh
docker build -t check_interfaces .
docker create --name="check_sw1" check_interfaces -c public -h sw1
docker start -a check_sw1
```

Create a debug build

```sh
docker build --build-arg target=debug -t check_interfaces .
```

0 comments on commit 05cb3a1

Please sign in to comment.