Skip to content

Commit

Permalink
Merge pull request #85 from indigo-dc/orchestrator-integration
Browse files Browse the repository at this point in the history
Increase version number for mesos probe and add docker file
  • Loading branch information
Jose Antonio Sanchez authored Mar 29, 2019
2 parents bd584c0 + 18925c8 commit 466078d
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 5 deletions.
9 changes: 8 additions & 1 deletion doc/mesos.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,11 @@ To change the location of the configuration file, you can provide a `-l <locatio

* mesos.metric: **This property can be defined more than once.** Each value of this property will be a metric retrieved from the metrics API that will be sent to the Zabbix server. Since those metrics come in the form `master/<metric>` it will be sent to Zabbix as `master.<metric>` key. Please make sure the key is correctly defined in the template associated to the host in the Zabbix configuration.

As for logging, the probe uses the default JDK 1.4 logging system through Apache Commons Logging. As such, a default configuration is provided in the file /etc/zabbix/mesosprobe-log.properties that will log events by default to the console and the /var/log/mesosprobe<number>.log file
As for logging, the probe uses the default JDK 1.4 logging system through Apache Commons Logging. As such, a default configuration is provided in the file /etc/zabbix/mesosprobe-log.properties that will log events by default to the console and the /var/log/mesosprobe<number>.log file

6 Docker
-----------------

Build a docker image with ```docker build . -t <image_name>:<image_version>``` where ```image_name``` and ```image_version``` are arbitrary names although something like ```mesos-probe:1.3``` is recommended

A container that executes the probe can then be run with ```docker run -v <config_path>:/etc/zabbix <image_name>:<image_version> <probe>``` where ```config_path``` is a path in the local filesystem to a folder containing a valid ```mesosprobe.properties``` file and ```probe``` is the probe to execute (```mesos```, ```chronos``` or ```marathon```)
12 changes: 12 additions & 0 deletions zabbix-probes/mesos-zabbix-probe/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM alpine:latest
MAINTAINER Jose Antonio Sanchez <jose.sanchezm@atos.net>

# Install java and zabbix agent
RUN apk --no-cache --update add openjdk8-jre-base nss
RUN mkdir /usr/share/java
RUN mkdir /usr/share/java/zabbix
COPY mesos-zabbix-probe-1.3-jar-with-dependencies.jar /usr/share/java/zabbix/mesos-zabbix-probe.jar
COPY src/mesosprobe.sh /usr/bin/mesosprobe.sh
RUN chmod +x /usr/bin/mesosprobe.sh
ENTRYPOINT ["mesosprobe.sh"]
CMD []
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions zabbix-probes/mesos-zabbix-probe/mesos-zabbix-probe.iml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.nimbusds:nimbus-jose-jwt:6.2" level="project" />
<orderEntry type="library" name="Maven: it.infn.ba.indigo:chronos-client:0.0.2-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.mesosphere:marathon-client:0.3.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
<orderEntry type="module" module-name="zabbix-probes-common" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-configuration2:2.3" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
Expand All @@ -42,6 +39,9 @@
<orderEntry type="library" name="Maven: com.nimbusds:nimbus-jose-jwt:7.0.1" level="project" />
<orderEntry type="library" name="Maven: org.lightcouch:lightcouch:0.2.0" level="project" />
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.4" level="project" />
<orderEntry type="library" name="Maven: it.infn.ba.indigo:chronos-client:0.0.2-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.mesosphere:marathon-client:0.3.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-client:2.25.1" level="project" />
<orderEntry type="library" name="Maven: javax.ws.rs:javax.ws.rs-api:2.0.1" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jersey.core:jersey-common:2.25.1" level="project" />
Expand Down
8 changes: 8 additions & 0 deletions zabbix-probes/mesos-zabbix-probe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<version>1.2</version>
</parent>

<version>1.3</version>


<inceptionYear>2016</inceptionYear>
<!--identityProvider>
Expand Down Expand Up @@ -41,6 +43,12 @@

<dependencies>

<dependency>
<groupId>org.indigo</groupId>
<artifactId>zabbix-probes-common</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>it.infn.ba.indigo</groupId>
<artifactId>chronos-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion zabbix-probes/mesos-zabbix-probe/src/mesosprobe.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

COMMAND=$1
LOG_CONF="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger -Djava.util.logging.config.file=/etc/zabbix/mesosprobe-log.properties"
Expand Down

0 comments on commit 466078d

Please sign in to comment.