Skip to content

Commit fe3d997

Browse files
author
Uldis Brize
committed
Fix ignored period in Zabbix 4
1 parent f96b950 commit fe3d997

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zbxtg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ def graph_get(self, itemid, period, title, width, height):
325325
"items[{0}][drawtype]={3}&items[{0}][color]={2}".format(i, itemid[i], colors[i], drawtype)
326326
zbx_img_url_itemids.append(itemid_url)
327327

328-
zbx_img_url = self.server + "/chart3.php?period={0}&name={1}" \
329-
"&width={2}&height={3}&graphtype=0&legend=1".format(period, title, width, height)
328+
zbx_img_url = self.server + "/chart3.php?period={0}&from=now-{0}&to=now" \
329+
"&name={1}&width={2}&height={3}&graphtype=0&legend=1".format(period, title, width, height)
330330
zbx_img_url += "".join(zbx_img_url_itemids)
331331

332332
if self.debug:

0 commit comments

Comments
 (0)