Add support for storing cached data in LONGSERVICEOUTPUT macro#43
Open
olliewalsh wants to merge 3 commits intowillixix:masterfrom
Open
Add support for storing cached data in LONGSERVICEOUTPUT macro#43olliewalsh wants to merge 3 commits intowillixix:masterfrom
olliewalsh wants to merge 3 commits intowillixix:masterfrom
Conversation
Owner
|
You're welcome to use this code for your own systems but I will not add this to plugin base cade because LONGSERVICE is something else and not designed for storing data variables. Its even worth for it than PERFDATA. And as far as support for graphing programs, you should use custom templates to specify exactly what perfdata to process. For PnP look at my github under graphing_templates/pnp4nagios and you'll find a template and config for this plugin and custom modified processdata perl script that adds new options for PNP in part to handle check_netint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This:
./check_netint.pl -H 172.16.203.172 -C public -n "eth\d+|em\d+" -f -q -k -y -M -B -m -P "DATA: cache_descr_ids=2 cache_descr_names=eth0 cache_descr_time=1383918585 'eth0_in_octet'=3326101411 'eth0_out_octet'=933507763 'eth0_in_octet.1383849652'=2790378964 'eth0_out_octet.1383849652'=533846849 ptime=1383918385" -T 1383918585 -e -z --nagios_longoutput
Outputs the following:
eth0:UP (0.0Mbps/0.0Mbps/0.0/0.0/0.0/0.0) (1 UP): OK | 'eth0_in_prct'=0% 'eth0_out_prct'=0% 'eth0_in_error'=0 'eth0_out_error'=0 'eth0_in_discard'=0 'eth0_out_discard'=0
DATA: cache_descr_ids=2 cache_descr_names=eth0 cache_descr_time=1383918585 'eth0_in_octet'=3326494996 'eth0_out_octet'=933967457 'eth0_in_octet.1383918385'=3326101411 'eth0_out_octet.1383918385'=933507763 ptime=1383918621
... which is valid PERFDATA. Without this option the -P option produces invalid PERFDATA and graphing tools reject it (e.g php4nagios).