Ad Widget

Collapse

UserParameter - access denied

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pawlosck
    Junior Member
    • Jul 2008
    • 5

    #1

    UserParameter - access denied

    Hi all

    I am new here, so I want to say hello to all.

    OK, and now my problem.

    I am using zabbix 1.1.7 and when I add:
    UserParameter=temp.cpu1,/home/pawel/bin/zabbix/zabbix_temp_cpu1, then I see in logs: "sh: /home/pawel/bin/zabbix/zabbix_temp_cpu1: access denied", but when I write: "UserParameter=temp.cpu1,sensors|grep "CPU temp:"|cut -c13-14", then all works.

    Contains file zabbix_temp_cpu1:
    #!/bin/sh
    sensors|grep "CPU temp:"|cut -c13-14

    Of course, it's not very big script, but I tried bigger script in perl, and was the same error.

    PS.I want to say sorry for my English, but it's not my native language.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Check the permissions for your script. Also "su" to the zabbix user and try to run the script.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    Working...