[collectd] Collectd Exec Plugin Permission denied for script

Kiran G kirancn47 at gmail.com
Mon Dec 28 01:45:30 CET 2020

I am testing the collectd Exec plugin using sample scripts before using it
for my end purpose. But I am facing issues with the sample script
<https://gist.github.com/apeckham/f783aa297516663f5c56> itself.

This is the error:

collectd[4585]: exec plugin: Failed to execute
``/home/ec2-user/magic_level.sh'': Permission denied

More info:

$cat /home/ec2-user/magic_level.sh
while sleep "$INTERVAL"; do
  echo "PUTVAL \"$HOSTNAME/exec-magic/gauge-magic_level\"
interval=$INTERVAL N:$(date +%N)"

$ls -l /home/ec2-user/magic_level.sh
-rwxrwxr-x. 1 ec2-user ec2-user 244 Dec 27 16:28 /home/ec2-user/magic_level.sh

My exec plugin configuration:

<Plugin exec>
    Exec "ec2-user" "/home/ec2-user/magic_level.sh"

Note: I could see that SELINUX is enabled. But I couldn't see any denials
for this script in the log

Can someone please help me resolve this
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20201228/35597ecb/attachment.html>

More information about the collectd mailing list