Why Nagios command not running from Thruk? - centos

I have few Nagios commands, one of the command is showing "CRITICAL" status on Thruk with a message of "Could not execute command." Where as when i try to execute the same command from terminal, is shows correct status with correct message.
This is happening only for few commands. Please help me on it.

Related

wildfly jboss cannot run in command prompt

Good day, I have issue on command for stop in command prompt.
In my command prompt after I key in the command: jboss-cli.bat --connect command=:shutdown
but the command prompt shows "the system cannot find the path specified".
I have try many ways to solve but still cannot solve this problem.
If successful actually will show:
"outcome" => "success",
"result" => undefined

send command to jupyter-server terminal

I am looking for a way to send command to a terminal that is running on a jupyter-server. This document shows API to create/query/delete a terminal but there is no information on how to execute a command (such as ls, cd)in the terminal.
Can someone tell me how to do it?
Thanks.

How to fix "mypy failed with error: Daemon has died . See Output panel for details." error in VS Code

I'm using the Mypy extension in VSCode, and it's giving me the error mypy failed with error: Daemon has died . See Output panel for details.
When I open the Output panel, it doesn't give me much more info than just telling my that it tried to run dmymy.EXE but that it had died.
How do I get the Mypy extension working again?
I've tried searching for this error on Google to no avail, and I've also tried rebooting VSCode, which gives me the same error every time.
Open up a Command Prompt (on Windows) or Terminal (non-Windows). Copy/paste the location of the dmypy.EXE script that it tried to run (from the output panel). Put start after the script. This will start the daemon.
The command looked like this for me:
C:\Users\MyUsername\AppData\Local\Programs\Python\Python38\Scripts\dmypy.EXE start
Now, reboot VS Code (I'm not sure if this is even needed), and the mypy extension should work again.

Opening emacsclient in terminal works but won't work with Automator

So I'm getting some pretty strange behaviour when I try to use an Automator service to open new emacs (GNU Version 25.2 with spacemacs) buffers.
In my terminal, the command emacsclient -a '' -c works as expected, opening a new buffer through emacsclient. However, when I make a service in Automator which simply runs a (/bin/bash) shell script:
emacsclient -a '' -c
I get an error message:
The action “Run Shell Script” encountered an error: “emacsclient: could not get terminal name”
On suspicions that this was due to Automator not using some default PATH variable, I tried the following instead:
PATH=/usr/local/bin:$PATH
emacsclient -c
which produced the same error as before.
Next I tried
PATH=/usr/bin:/usr/local/bin export PATH;
emacsclient -c
which produced a different error message:
The action “Run Shell Script” encountered an error: “emacsclient: invalid option -- c
Try `emacsclient --help' for more information”
however why I try that script in my terminal it also gives a similar error which doesn't make much sense to me.
If anyone has suggestions for how to fix this I'd really appreciate it.
The problem is the shell script is running an old version of emacsclient in /usr/bin you need to run the one in Emacs.app/Contents/MacOS/bin/emacsclient. Delete the PATH line and you can use a solution listed here for running emacsclient inside automator Running a macOS service for open with emacs failed with "emacsclient: could not get terminal name mac"

unable to take user input in perl

I am having a strange issue. I have written a script which is basically running a perl script in remote server using ssh.
This script is working fine but after completion of the above operation it will ask user to choose the next operation.
it is showing the options in the command prompt but while I am giving any input it is not showing in the screen even after hitting enter also it remain same.
I am not getting what is the exact issue, but it seems there is some issue with the ssh command because if I am commenting out the ssh command it is working fine.
OPERATION:
print "1: run the script in remote server \n2: Exit\n\nEnter your choice:";
my $input=<STDIN>;
chomp($input);
..........
sub run_script()
{
my $com="sshg3.exe server -q --user=user --password=pass -exec script >/dev/null";
system("$com");
goto OPERATION;
}
after completing this ssh script it is showing in screen:
1: run remote script
2: exit
Enter your choice:
but while I am giving any input it is not displaying in the screen until and unless I am exiting it using crtl C.
Please can anyone help what might be the issue here ?
One of the classic gotchas with ssh is this - that it normally runs interactively, and as such will attach STDIN by default.
This can result in STDIN being consumed by ssh rather than your script.
Try it with ssh -n instead.
You can redirect the output in command prompt if -n option is not available for you.
try this one it might work for you.
system("$com />null");
As per https://support.ssh.com/manuals/client-user/62/sshg3.html there is an option for redirecting input use --dev-null (*nix) or --null (Windows).
-n, --dev-null (Unix), -n, --null (Windows)
Redirects input from /dev/null (Unix) and from NUL (Windows).