I have uploaded the screenshot and when navigating to "/usr/local/nagios/share/perfdata/<hostname>/", I don't see any of the mentioned files.
--Berto
Check_smb_status.sh Plugin
Re: Check_smb_status.sh Plugin
You do not have the required permissions to view the files attached to this post.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Check_smb_status.sh Plugin
You have two problems:
1)
On your screenshot there is nothing in the "Performance Data" field, this is why you are not getting graphs.
Here is an example of me executing it on a remote CentOS system:
ssh nagios@centos01 /usr/local/nagios/libexec/check_smb_status_original.sh
Total Users/Process:0 Total Machines:0 Total Files:0 |Total Users/Process=0 Total Machines=0 Total Files=0
You can see the highlighted information is the performance data.
Based on your screenshot, this is a Solaris server. I know some commands in Solaris work differently so I suspect you are going to need to spend some time with the commands in the script to see if they are outputting the correct information.
2)
The performance data output by the plugin (from my tests) is not correctly formatted.
|Total Users/Process=0 Total Machines=0 Total Files=0
The datasources have spaces, hence they need to be enclosed in single quotes, like:
|'Total Users/Process'=0 'Total Machines'=0 'Total Files'=0
I think line 87 of the plugin should be:
https://nagios-plugins.org/doc/guidelines.html#AEN200
1)
On your screenshot there is nothing in the "Performance Data" field, this is why you are not getting graphs.
That example output does not have any performance data, performance data is everything after the pipe symbol | .Berto wrote:If I do it from the nagios server to the host from command line it does display back;
Code: Select all
[lnsvr0370]:(584/0)-$ ssh abeltr01@susvr0215 /opt/nagios/libexec/check_smb_status.sh Total Users/Process: 110 Total Machines: 108 Total Files: 715
Here is an example of me executing it on a remote CentOS system:
ssh nagios@centos01 /usr/local/nagios/libexec/check_smb_status_original.sh
Total Users/Process:0 Total Machines:0 Total Files:0 |Total Users/Process=0 Total Machines=0 Total Files=0
You can see the highlighted information is the performance data.
Based on your screenshot, this is a Solaris server. I know some commands in Solaris work differently so I suspect you are going to need to spend some time with the commands in the script to see if they are outputting the correct information.
2)
The performance data output by the plugin (from my tests) is not correctly formatted.
|Total Users/Process=0 Total Machines=0 Total Files=0
The datasources have spaces, hence they need to be enclosed in single quotes, like:
|'Total Users/Process'=0 'Total Machines'=0 'Total Files'=0
I think line 87 of the plugin should be:
Code: Select all
echo "Total Users/Process:$total_usersProcess Total Machines:$total_machines Total Files:$total_files |'Total Users/Process'=$total_usersProcess 'Total Machines'=$total_machines 'Total Files'=$total_files"As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Check_smb_status.sh Plugin
The graph is now working, thanks a lot! This can be closed.
--Berto
--Berto