Search found 7 matches

by raja2206
Tue Jun 19, 2018 4:33 am
Forum: Nagios XI
Topic: Nagios return 0byte string from bash script
Replies: 15
Views: 2176

Re: Nagios return 0byte string from bash script

Hi, Inside the script have command, which is also have nagios permission, # ls -la uemcli lrwxrwxrwx 1 nagios nagios 29 Mar 8 14:35 uemcli -> /opt/emc/uemcli/bin/uemcli.sh # ls -la /opt/emc/uemcli/bin/uemcli -rwxrwxrwx 1 nagios nagios 2948695 Jan 16 00:12 /opt/emc/uemcli/bin/uemcli # more /opt/emc/u...
by raja2206
Mon Jun 18, 2018 4:23 am
Forum: Nagios XI
Topic: Nagios return 0byte string from bash script
Replies: 15
Views: 2176

Re: Nagios return 0byte string from bash script

Hi,

I have full permission for the commands and also I am using the same full path command in shell script.

# ls -la /opt/emc/uemcli/bin/uemcli.sh
-rwxrwxrwx 1 nagios nagios 300 Jan 16 00:12 /opt/emc/uemcli/bin/uemcli.sh

in script : ucli=/opt/emc/uemcli/bin/uemcli.sh
by raja2206
Wed Jun 13, 2018 9:29 pm
Forum: Nagios XI
Topic: Nagios return 0byte string from bash script
Replies: 15
Views: 2176

Re: Nagios return 0byte string from bash script

Hi,

I hope, script is fine, because I can get output, if I run from CLI, but nagios is not able to execute the command with proper way.

there is no permission issue.

Any suggestion ?
by raja2206
Wed Jun 13, 2018 9:47 am
Forum: Nagios XI
Topic: Nagios return 0byte string from bash script
Replies: 15
Views: 2176

Re: Nagios return 0byte string from bash script

Hi, I have restarted the nagios services, still same error. command.cfg file #check_unity_general define command{ command_name check_unity_status command_line $USER2$/check_unity.sh $HOSTADDRESS$ $ARG1$ $ARG2$ $ARG3$ } Monitor config file define service{ use array-service ; Inherit values from a tem...
by raja2206
Wed Jun 13, 2018 2:01 am
Forum: Nagios XI
Topic: Nagios return 0byte string from bash script
Replies: 15
Views: 2176

Re: Nagios return 0byte string from bash script

Hi, I have updated the .cfg file, but still no output from nagios. However from command is working fine define service{ use array-service ; Inherit values from a template service_description check unity Status host_name unity500 ; hostname the service is associated with check_command check_unity_sta...
by raja2206
Tue Jun 12, 2018 2:29 am
Forum: Nagios XI
Topic: Nagios return 0byte string from bash script
Replies: 15
Views: 2176

Re: Nagios return 0byte string from bash script

HI, please find the output.
#/opt/nagios/libexec # sudo su nagios -c '/opt/nagios/libexec/check_unity.sh unity500 Monitor password /env/ps'
OK - no faults detected

Note : my password has special character '%' in the middle
by raja2206
Mon Jun 11, 2018 6:40 am
Forum: Nagios XI
Topic: Nagios return 0byte string from bash script
Replies: 15
Views: 2176

Nagios return 0byte string from bash script

Hi, We have configured shell script to mointior unity storage via nagios, the script is working fine via CLI, but it is 0 byte output via nagios # ls -la check_unity.sh -rwxr-xr-x 1 nagios nagios 681 Jun 11 11:19 check_unity.sh # cat check_unity.sh #!/bin/bash ucli=/usr/bin/uemcli host=$1 user="...