Browse Source

graphics from zabbix

master
Vladimir Smagin 1 year ago
parent
commit
87c26453d8
3 changed files with 16 additions and 0 deletions
  1. +2
    -0
      .gitignore
  2. +11
    -0
      daily-job.sh
  3. +3
    -0
      zabbix_creds.demo

+ 2
- 0
.gitignore View File

@@ -1,2 +1,4 @@
datadir
*.log
daily-job.cookies
zabbix_creds

+ 11
- 0
daily-job.sh View File

@@ -0,0 +1,11 @@
#!/bin/bash
cd "$(dirname "$0")"

source zabbix_creds

ts=$(date -u '+%F')

wget --save-cookies=daily-job.cookies -4 --keep-session-cookies -O - -S --post-data="name=${zbxuser}&password=${zbxpass}&enter=Sign in&autologin=1" "${zbxurl}/index.php?login=1"
wget -4 --load-cookies=daily-job.cookies -O datadir/$ts/graph_termo_utc+7.png "${zbxurl}/chart2.php?graphid=1005&from=now-24h&to=now&profileIdx=web.graphs.filter&profileIdx2=1005&width=959&_=tf88n7na&screenid="
wget -4 --load-cookies=daily-job.cookies -O datadir/$ts/graph_pressure_utc+7.png "${zbxurl}/chart2.php?graphid=989&from=now-2d&to=now&profileIdx=web.graphs.filter&profileIdx2=989&width=959&_=tf89f0en"


+ 3
- 0
zabbix_creds.demo View File

@@ -0,0 +1,3 @@
zbxuser=admin
zbxpass=password
zbxurl=https://monitoring.server.ru

Loading…
Cancel
Save