# CLI curl command is working but the plugin output in icinga web is showing errors(Serial Based Devices API)

**URL:** <https://community.icinga.com/t/cli-curl-command-is-working-but-the-plugin-output-in-icinga-web-is-showing-errors-serial-based-devices-api/9840>\
**Category:** Icinga 2\
**Tags:** plugins, icingaweb2, api, icinga2\
**Created:** [May 17, 2022, 11:20am UTC](https://community.icinga.com/t/cli-curl-command-is-working-but-the-plugin-output-in-icinga-web-is-showing-errors-serial-based-devices-api/9840 "2022-05-17T11:20:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Umer](https://community.icinga.com/letter_avatar_proxy/v4/letter/u/aca169/32.png) [@Umer](https://community.icinga.com/u/Umer)\
**Post date:** [May 17, 2022, 11:20am UTC](https://community.icinga.com/t/cli-curl-command-is-working-but-the-plugin-output-in-icinga-web-is-showing-errors-serial-based-devices-api/9840/1 "2022-05-17T11:20:38Z")

</div>

We made a Plugin for checking status of serial based devices.By running the curl (curl -v [http://ip-address:5050/hardware-status](http://ip-address:5050/hardware-status))command in terminal we were getting error free output.Whereas in icinga web its showing errors.I am attaching screenshots for reference.Your support is required.

![terminal output](https://community.icinga.com/uploads/default/original/2X/1/18fe46ddab4be5572d1e5c7d9f69e346fbff030a.png)  
 ![icinga](https://community.icinga.com/uploads/default/original/2X/3/32c29a8b586d281ef9b3dcd4b70a5a989e8ec30b.png)

---

<div class="post-metadata">

**Author:** ![jbrost](https://community.icinga.com/user_avatar/community.icinga.com/jbrost/32/3374_2.png) [@jbrost](https://community.icinga.com/u/jbrost)\
**Post date:** [May 17, 2022, 3:51pm UTC](https://community.icinga.com/t/cli-curl-command-is-working-but-the-plugin-output-in-icinga-web-is-showing-errors-serial-based-devices-api/9840/2 "2022-05-17T15:51:04Z")

</div>

Permission denied may indicate that your check is restricted by SELinux. What Linux distribution are you using?

Another possible way to get something like this: you’re probably running the check as a different user and you can create firewall rules matching on users information with iptables and nftables.

---

<div class="post-metadata">

**Author:** ![Umer](https://community.icinga.com/letter_avatar_proxy/v4/letter/u/aca169/32.png) [@Umer](https://community.icinga.com/u/Umer)\
**Post date:** [May 18, 2022, 12:01pm UTC](https://community.icinga.com/t/cli-curl-command-is-working-but-the-plugin-output-in-icinga-web-is-showing-errors-serial-based-devices-api/9840/3 "2022-05-18T12:01:22Z")

</div>

Thankyou for your support @jbrost . The error got resolved after setting selinux in permissive mode.

![sestatus](https://community.icinga.com/uploads/default/original/2X/5/556e21d036f3334e3fca8273c4103f2e0b844d8d.png)  
 ![script permissions](https://community.icinga.com/uploads/default/original/2X/5/5b98f91e6b2bccb53368f9bc6f51420c24ee72e3.png)  
 ![hardware status](https://community.icinga.com/uploads/default/original/2X/6/6985b490e806a51b25059f4ec73aae66f976b57e.png)  
 ![icinga1](https://community.icinga.com/uploads/default/original/2X/a/a7253a11fe48308402ecd74ab3b9df0a8576666c.png)  
 ![icinga2](https://community.icinga.com/uploads/default/original/2X/2/2c3ac4459f25f54bcae47e70522d9334cfc143bc.png)
