Set up up threshold and generating performance data
Posted: Sun Dec 10, 2017 5:31 pm
I've been trying my best to understand how to set up threshold and generate performance data on my own nagios script.
My script's supposed to check how many files are generated every hours. These files have different categories.
I need to have the following nagios command working:
/usr/local/nagios/libexec/check_v -w 200,150,150,1,2 -c 500,200,200,5,20
200 is FileCategory1 150 is FileCategory 2 and so on and so forth.
So for FileCategory1, if there were 200 files generated at that hour, It will generate a WARNING alarm. And if there's 500 files generated at that hour, a CRITICAL alarm will be activated on Nagios.
I have a jar file that generates a text file where all of the needed data output are in. I just have to know how can I make my nagios command work. I know how to make nagios alarm, with all of the exit codes and such but I'm not so sure how the $args1 etc etc works? Like what should my .sh output be besides the exit codes? Do i even have to have the exit codes anymore since I already have the -w and -c on the nagios command? And where will nagios supposed to read the numbers? (200,150,150,1,2) In which file should I put in the performance data syntax with the pipe (|)?
I hope my question is clear. I've read the documentation but I'm still confused as hell.
My script's supposed to check how many files are generated every hours. These files have different categories.
I need to have the following nagios command working:
/usr/local/nagios/libexec/check_v -w 200,150,150,1,2 -c 500,200,200,5,20
200 is FileCategory1 150 is FileCategory 2 and so on and so forth.
So for FileCategory1, if there were 200 files generated at that hour, It will generate a WARNING alarm. And if there's 500 files generated at that hour, a CRITICAL alarm will be activated on Nagios.
I have a jar file that generates a text file where all of the needed data output are in. I just have to know how can I make my nagios command work. I know how to make nagios alarm, with all of the exit codes and such but I'm not so sure how the $args1 etc etc works? Like what should my .sh output be besides the exit codes? Do i even have to have the exit codes anymore since I already have the -w and -c on the nagios command? And where will nagios supposed to read the numbers? (200,150,150,1,2) In which file should I put in the performance data syntax with the pipe (|)?
I hope my question is clear. I've read the documentation but I'm still confused as hell.