Ad Widget

Collapse

Error trying to use system.run in an Item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adminjerry
    Junior Member
    • May 2022
    • 18

    #1

    Error trying to use system.run in an Item

    I am creating an Item for Linux servers where I want to run a command but keep getting the error "failed to configure logger".
    Item parameters:
    Zabbix agent
    Key: system.run[ksplice kernel uname -r]
    I have also tried this as system.run["ksplice kernel uname -r"] and also created a script with a line ksplice kernel uname -r and set permissions as 755.
    Type of information: Text
    Preprocessing: Discard with heartbeat.

    My test server has these entries in zabbix_agent2.conf:
    AllowKey=system.run[*,*]
    Plugins.SystemRun.LogRemoteCommands=1

    I have tested it in the item screen and also from command line zabbix_get -s IP -k system.run["ksplice kernel uname -r"]
    Result every time: Error: failed to configure the logger
    I can't figure out why this isn't working.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    I suspect that is the error that your ksplice command returns...
    from this page https://www.dbi-services.com/blog/al7/ I suspect you just have no permissions to run that command as user zabbix.
    Code:
    [opc@al ~]$ ksplice -y all upgrade
    Error: failed to configure the logger
    [opc@al ~]$ sudo ksplice -y all upgrade
    Updating on-disk packages for new processes
    You see, first it fails as ordinary user, and then runs via sudo...

    Comment

    Working...