title: Is it possible to execute system.run[] with Zabbix 3.0 JSON-RPC API?
body: <p>I'm trying to remotely stop/start services using <code>systemctl</code> inside Zabbix's <code>system.run[]</code> request/item but it doesn't seem to work. </p>
  
  <p>I'm using Zabbix 3.0 JSON-RPC API and my JSON looks like this:</p>
  
  <pre><code>{
    "jsonrpc": "2.0",
    "method": "item.get",
    "params": {
      "filter": {
        "host": "host-name",
        "key_": "system.run[sudo systemctl stop nginx.service]"
      }
    },
    "id": 1,
    "auth": "my-token"
  }
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>{"jsonrpc":"2.0","result":[],"id":1}
  </code></pre>
  
  <p>But I'm not too sure about validity of this request because all the information I've seen on <code>system.run[]</code> so far was related to zabbix_get. Is it even possible to execute <code>system.run[]</code> this way? What am I doing wrong? </p>
  
  <p>This is obviously just filtering items but I have no idea how to replicate what zabbix_get does using Zabbix JSON-RPC API. There is no information I could find about this.</p>
  
  <p>This works well for gathering data, tho:</p>
  
  <pre><code>{
    "jsonrpc": "2.0",
    "method": "item.get",
    "params": {
      "filter": {
        "host": "host-name",
        "key_": "vm.memory.size[used]"
      }
    },
    "id": 1,
    "auth": "my-token"
  }
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>{
    "jsonrpc": "2.0",
    "result": [
      {
        "itemid": "455",
        "type": "0",
        "snmp_community": "",
        "snmp_oid": "",
        "hostid": "12241",
        "name": "Used memory",
        "key_": "vm.memory.size[used]",
        "delay": "60",
        "history": "90",
        "trends": "365",
        "status": "0",
        "value_type": "3",
        "trapper_hosts": "",
        "units": "B",
        "multiplier": "0",
        "delta": "0",
        "snmpv3_securityname": "",
        "snmpv3_securitylevel": "0",
        "snmpv3_authpassphrase": "",
        "snmpv3_privpassphrase": "",
        "formula": "1",
        "error": "",
        "lastlogsize": "0",
        "logtimefmt": "",
        "templateid": "106",
        "valuemapid": "0",
        "delay_flex": "",
        "params": "",
        "ipmi_sensor": "",
        "data_type": "0",
        "authtype": "0",
        "username": "",
        "password": "",
        "publickey": "",
        "privatekey": "",
        "mtime": "0",
        "flags": "0",
        "interfaceid": "2",
        "port": "",
        "description": "",
        "inventory_link": "0",
        "lifetime": "30",
        "snmpv3_authprotocol": "0",
        "snmpv3_privprotocol": "0",
        "state": "0",
        "snmpv3_contextname": "",
        "evaltype": "0",
        "lastclock": "1466142275",
        "lastns": "142277413",
        "lastvalue": "3971121455",
        "prevvalue": "3971001230"
      }
    ],
    "id": 1
  }
  </code></pre>
  
  <p>If someone managed to execute <code>system.run[]</code> using JSON-RPC API, please, share your solution. 
  Thank you.</p>