Skip to content

Instantly share code, notes, and snippets.

@yotamoron
Created May 22, 2013 08:17
Show Gist options
  • Save yotamoron/5626029 to your computer and use it in GitHub Desktop.
Save yotamoron/5626029 to your computer and use it in GitHub Desktop.
Rendering the custom objects in Nagios's status-json.c CGI-BIN executable.
912a913
> customvariablesmember *custom_variables = NULL;
994a996,998
> for (custom_variables = temp_host->custom_variables; custom_variables; custom_variables = custom_variables->next) {
> printf("\t\t\t\t \"%s\":\"%s\", \n", custom_variables->variable_name, custom_variables->variable_value);
> }
1082c1086,1088
<
---
> for (custom_variables = temp_service->custom_variables; custom_variables; custom_variables = custom_variables->next) {
> printf("\t\t\t\t \"%s\":\"%s\", \n", custom_variables->variable_name, custom_variables->variable_value);
> }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment