Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-776

getting script output as a file and ability for transfer binary output for file

XMLWordPrintable

    • Icon: Change Request Change Request
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • None
    • None
    • php 5.2.12

      First. we need alter table (example for psql)
      ALTER TABLE scripts add isbase64 smallint default 0;
      ALTER TABLE scripts add isfile smallint default 0;
      ALTER TABLE scripts add ctype varchar(255) default 0;
      ALTER TABLE scripts add filename varchar(255) default 0;

      Then update affect files:
      include/scripts.inc.php
      include/locales/en_gb.inc.php
      /scripts.php
      /sysmaps.php
      /scripts_exec_file.php

      After this in Administration->scripts we will be able configure script for outputted it as file. And if output will be base64 encoding data, configure that will be decoded in php web interface. Also filename and content-type available.

      For example we can configure script as /usr/bin/ssh -i /home/zabbix/.ssh/id_rsa root@

      {HOST.CONN}

      "(ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; ps aux; )| bzip2 | base64" and as output get correct bzip file

            Unassigned Unassigned
            inakrin Fyodor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: