This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
request(method, params) { | |
return this.zabbixAPICore.request(this.url, method, params, this.requestOptions, this.auth) | |
.catch(error => { | |
if (isNotAuthorized(error.data)) { | |
// Handle auth errors | |
this.loginErrorCount++; | |
if (this.loginErrorCount > this.maxLoginAttempts) { | |
this.loginErrorCount = 0; | |
return null; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:stable | |
# Copy the current directory contents into the container at /zas | |
# Current dir contains only github repo with zas_agent | |
ADD . /zas | |
WORKDIR /zas | |
RUN apt-get update && apt-get install -y ca-certificates python python-setuptools python-numpy | |
WORKDIR /zas/zas_agent/install | |
RUN python check_python_packages.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import hashlib | |
mypasswords = [ | |
"doors", | |
"d00rs", | |
"Morrison", | |
"Hotel" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT h.name as 'host', inv.location as 'geohash', | |
CASE | |
WHEN IFNULL(problems.count, 0)=0 AND IFNULL(status.value, 0)>0 THEN 0 -- Green status | |
WHEN IFNULL(problems.count, 0)>0 AND IFNULL(status.value, 0)>0 THEN 1 -- Yellow status | |
ELSE 2 -- Red status | |
END as 'metric' | |
FROM hosts h LEFT JOIN host_inventory inv USING(hostid) | |
LEFT JOIN ( | |
SELECT h.hostid, COUNT(t.triggerid) as count | |
FROM triggers t, functions f, items i, hosts h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:xenial | |
ENV GRIDDB_VERSION="4.2.1" | |
ENV DOWNLOAD_URL=https://github.com/griddb/griddb_nosql/releases/download/v${GRIDDB_VERSION}/griddb-nosql_${GRIDDB_VERSION}_amd64.deb | |
RUN apt-get -y update \ | |
&& apt-get -y install curl python openjdk-9-jre vim | |
RUN curl ${DOWNLOAD_URL} --output griddb-nosql_amd64.deb --silent --location | |
RUN ls -lh ./ |