• Linux
  • FreeBSD
  • Networking
  • Python
  • AWS
  • WebDev
  • About Us
Tech Tips and Tutorials
Menu
  • Linux
  • FreeBSD
  • Networking
  • Python
  • AWS
  • WebDev
  • About Us
Home  /  Linux  /  Nagios showing different outputs while running plugins locally and from remote server

Nagios showing different outputs while running plugins locally and from remote server

Written by
Linux Leave a Comment

So when you have a custom plugin and you run it locally you will get the correct output but when you call the same plugin from the remote server (nagiosadmin) the output will be wrong . This is a user permission issue on some files you specified in the plugin script .For eg : if your plugin script is opening a log file which is in a different folder and it then doesn’t have the correct permission to open that file . In most cases you will be running the plugin as root locally but from remote server the same plugin will be executed from a user level . For eg : In AWS EC2 , the command from the remote server is using the default user ‘ec2-user’ and if ‘ec2-user’ doesn’t have the permssion to read the files , it will end up in error like this . So you need to find out the correct user and try running the command locally from that user , say , if you run the command as ec2-user , you will then get the same output error which you see running from the remote server . You need to tweak the permission of that file which is then executable by the user . So make sure ec2-user is part of wheel group and the ownership of your plugin should be root:wheel and then any files mentioned in the plugin should have read and execute permission from ‘ec2-user’ .

Share On
Share on Facebook
Share on Twitter
Share on Google+
Share on Whatsapp

 Previous Article How to avoid whitespaces on a variable output in shell
Next Article   How to list and mount an external USB disk in FreeBSD

Related Posts

  • Linux Shell Scripts for System Administrators

  • SOCKS PROXY

  • How to grep IP addresses from log files in Linux

Leave a Reply

Cancel reply

  • Popular Posts
  • Recent Posts
  • Linux Shell Scripts for System Administrators
  • Cacti 1.1.38 ERROR Opening .rrd No Such file or directory
  • Apache configuration for Cacti
  • How to create RAM disk in Ubuntu 18.04
  • Linux Shell Scripts for System Administrators
  • SOCKS PROXY
  • How to install XAMPP and access phpMyAdmin in MAC OS
  • How to increase the root volume in a Linux ec2 instance

Linux

  • Linux Shell Scripts for System Administrators
  • SOCKS PROXY
  • How to grep IP addresses from log files in Linux
  • How to empty or delete a large file in Linux

Categories

  • AWS (5)
  • FreeBSD (12)
  • Linux (29)
  • Networking (3)
  • Python (5)
  • Uncategorized (4)
  • WebDev (1)
  • Connect on Facebook
  • Connect on YouTube
© Copyright 2020.TechieNix. All Rights Reserved.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.