Forum Tips

News about the forum, articles on posting, and general subjects not related to the products go here. Read-only.

Forum Tips

Postby tmcdonald » Tue Aug 11, 2015 1:10 pm

Hello Nagios Forum!

In this article I am going to go over some of the tips we use to make our posts as concise and readable as we can. Occasionally we may edit a user's post to make it more clear, and we use the same sort of tricks that we do in our own posts when doing so. We welcome and encourage you to beat us to the punch :)

  • [­code][­/code] tags

    When posting long output, file contents, or anything that needs to have spaces preserved (such as ASCII diagrams), it is helpful to wrap the contents in [­code][­/code] tags:

    Code: Select all
    99 bottles of beer on the wall, 99 bottles of beer.  Take one down, pass it around, 98 bottles of beer on the wall.
    98 bottles of beer on the wall, 98 bottles of beer.  Take one down, pass it around, 97 bottles of beer on the wall.
    97 bottles of beer on the wall, 97 bottles of beer.  Take one down, pass it around, 96 bottles of beer on the wall.
    96 bottles of beer on the wall, 96 bottles of beer.  Take one down, pass it around, 95 bottles of beer on the wall.
    95 bottles of beer on the wall, 95 bottles of beer.  Take one down, pass it around, 94 bottles of beer on the wall.
    94 bottles of beer on the wall, 94 bottles of beer.  Take one down, pass it around, 93 bottles of beer on the wall.
    93 bottles of beer on the wall, 93 bottles of beer.  Take one down, pass it around, 92 bottles of beer on the wall.
    92 bottles of beer on the wall, 92 bottles of beer.  Take one down, pass it around, 91 bottles of beer on the wall.
    91 bottles of beer on the wall, 91 bottles of beer.  Take one down, pass it around, 90 bottles of beer on the wall.
    90 bottles of beer on the wall, 90 bottles of beer.  Take one down, pass it around, 89 bottles of beer on the wall.
    89 bottles of beer on the wall, 89 bottles of beer.  Take one down, pass it around, 88 bottles of beer on the wall.
    88 bottles of beer on the wall, 88 bottles of beer.  Take one down, pass it around, 87 bottles of beer on the wall.
    87 bottles of beer on the wall, 87 bottles of beer.  Take one down, pass it around, 86 bottles of beer on the wall.
    86 bottles of beer on the wall, 86 bottles of beer.  Take one down, pass it around, 85 bottles of beer on the wall.
    85 bottles of beer on the wall, 85 bottles of beer.  Take one down, pass it around, 84 bottles of beer on the wall.
    84 bottles of beer on the wall, 84 bottles of beer.  Take one down, pass it around, 83 bottles of beer on the wall.
    83 bottles of beer on the wall, 83 bottles of beer.  Take one down, pass it around, 82 bottles of beer on the wall.
    82 bottles of beer on the wall, 82 bottles of beer.  Take one down, pass it around, 81 bottles of beer on the wall.
    81 bottles of beer on the wall, 81 bottles of beer.  Take one down, pass it around, 80 bottles of beer on the wall.
    80 bottles of beer on the wall, 80 bottles of beer.  Take one down, pass it around, 79 bottles of beer on the wall.
    79 bottles of beer on the wall, 79 bottles of beer.  Take one down, pass it around, 78 bottles of beer on the wall.
    78 bottles of beer on the wall, 78 bottles of beer.  Take one down, pass it around, 77 bottles of beer on the wall.
    77 bottles of beer on the wall, 77 bottles of beer.  Take one down, pass it around, 76 bottles of beer on the wall.
    76 bottles of beer on the wall, 76 bottles of beer.  Take one down, pass it around, 75 bottles of beer on the wall.
    75 bottles of beer on the wall, 75 bottles of beer.  Take one down, pass it around, 74 bottles of beer on the wall.
    74 bottles of beer on the wall, 74 bottles of beer.  Take one down, pass it around, 73 bottles of beer on the wall.
    73 bottles of beer on the wall, 73 bottles of beer.  Take one down, pass it around, 72 bottles of beer on the wall.
    72 bottles of beer on the wall, 72 bottles of beer.  Take one down, pass it around, 71 bottles of beer on the wall.
    71 bottles of beer on the wall, 71 bottles of beer.  Take one down, pass it around, 70 bottles of beer on the wall.
    70 bottles of beer on the wall, 70 bottles of beer.  Take one down, pass it around, 69 bottles of beer on the wall.
    69 bottles of beer on the wall, 69 bottles of beer.  Take one down, pass it around, 68 bottles of beer on the wall.
    68 bottles of beer on the wall, 68 bottles of beer.  Take one down, pass it around, 67 bottles of beer on the wall.
    67 bottles of beer on the wall, 67 bottles of beer.  Take one down, pass it around, 66 bottles of beer on the wall.
    66 bottles of beer on the wall, 66 bottles of beer.  Take one down, pass it around, 65 bottles of beer on the wall.
    65 bottles of beer on the wall, 65 bottles of beer.  Take one down, pass it around, 64 bottles of beer on the wall.
    64 bottles of beer on the wall, 64 bottles of beer.  Take one down, pass it around, 63 bottles of beer on the wall.
    63 bottles of beer on the wall, 63 bottles of beer.  Take one down, pass it around, 62 bottles of beer on the wall.
    62 bottles of beer on the wall, 62 bottles of beer.  Take one down, pass it around, 61 bottles of beer on the wall.
    61 bottles of beer on the wall, 61 bottles of beer.  Take one down, pass it around, 60 bottles of beer on the wall.
    60 bottles of beer on the wall, 60 bottles of beer.  Take one down, pass it around, 59 bottles of beer on the wall.
    59 bottles of beer on the wall, 59 bottles of beer.  Take one down, pass it around, 58 bottles of beer on the wall.
    58 bottles of beer on the wall, 58 bottles of beer.  Take one down, pass it around, 57 bottles of beer on the wall.
    57 bottles of beer on the wall, 57 bottles of beer.  Take one down, pass it around, 56 bottles of beer on the wall.
    56 bottles of beer on the wall, 56 bottles of beer.  Take one down, pass it around, 55 bottles of beer on the wall.
    55 bottles of beer on the wall, 55 bottles of beer.  Take one down, pass it around, 54 bottles of beer on the wall.
    54 bottles of beer on the wall, 54 bottles of beer.  Take one down, pass it around, 53 bottles of beer on the wall.
    53 bottles of beer on the wall, 53 bottles of beer.  Take one down, pass it around, 52 bottles of beer on the wall.
    52 bottles of beer on the wall, 52 bottles of beer.  Take one down, pass it around, 51 bottles of beer on the wall.
    51 bottles of beer on the wall, 51 bottles of beer.  Take one down, pass it around, 50 bottles of beer on the wall.
    50 bottles of beer on the wall, 50 bottles of beer.  Take one down, pass it around, 49 bottles of beer on the wall.
    49 bottles of beer on the wall, 49 bottles of beer.  Take one down, pass it around, 48 bottles of beer on the wall.
    48 bottles of beer on the wall, 48 bottles of beer.  Take one down, pass it around, 47 bottles of beer on the wall.
    47 bottles of beer on the wall, 47 bottles of beer.  Take one down, pass it around, 46 bottles of beer on the wall.
    46 bottles of beer on the wall, 46 bottles of beer.  Take one down, pass it around, 45 bottles of beer on the wall.
    45 bottles of beer on the wall, 45 bottles of beer.  Take one down, pass it around, 44 bottles of beer on the wall.
    44 bottles of beer on the wall, 44 bottles of beer.  Take one down, pass it around, 43 bottles of beer on the wall.
    43 bottles of beer on the wall, 43 bottles of beer.  Take one down, pass it around, 42 bottles of beer on the wall.
    42 bottles of beer on the wall, 42 bottles of beer.  Take one down, pass it around, 41 bottles of beer on the wall.
    41 bottles of beer on the wall, 41 bottles of beer.  Take one down, pass it around, 40 bottles of beer on the wall.
    40 bottles of beer on the wall, 40 bottles of beer.  Take one down, pass it around, 39 bottles of beer on the wall.
    39 bottles of beer on the wall, 39 bottles of beer.  Take one down, pass it around, 38 bottles of beer on the wall.
    38 bottles of beer on the wall, 38 bottles of beer.  Take one down, pass it around, 37 bottles of beer on the wall.
    37 bottles of beer on the wall, 37 bottles of beer.  Take one down, pass it around, 36 bottles of beer on the wall.
    36 bottles of beer on the wall, 36 bottles of beer.  Take one down, pass it around, 35 bottles of beer on the wall.
    35 bottles of beer on the wall, 35 bottles of beer.  Take one down, pass it around, 34 bottles of beer on the wall.
    34 bottles of beer on the wall, 34 bottles of beer.  Take one down, pass it around, 33 bottles of beer on the wall.
    33 bottles of beer on the wall, 33 bottles of beer.  Take one down, pass it around, 32 bottles of beer on the wall.
    32 bottles of beer on the wall, 32 bottles of beer.  Take one down, pass it around, 31 bottles of beer on the wall.
    31 bottles of beer on the wall, 31 bottles of beer.  Take one down, pass it around, 30 bottles of beer on the wall.
    30 bottles of beer on the wall, 30 bottles of beer.  Take one down, pass it around, 29 bottles of beer on the wall.
    29 bottles of beer on the wall, 29 bottles of beer.  Take one down, pass it around, 28 bottles of beer on the wall.
    28 bottles of beer on the wall, 28 bottles of beer.  Take one down, pass it around, 27 bottles of beer on the wall.
    27 bottles of beer on the wall, 27 bottles of beer.  Take one down, pass it around, 26 bottles of beer on the wall.
    26 bottles of beer on the wall, 26 bottles of beer.  Take one down, pass it around, 25 bottles of beer on the wall.
    25 bottles of beer on the wall, 25 bottles of beer.  Take one down, pass it around, 24 bottles of beer on the wall.
    24 bottles of beer on the wall, 24 bottles of beer.  Take one down, pass it around, 23 bottles of beer on the wall.
    23 bottles of beer on the wall, 23 bottles of beer.  Take one down, pass it around, 22 bottles of beer on the wall.
    22 bottles of beer on the wall, 22 bottles of beer.  Take one down, pass it around, 21 bottles of beer on the wall.
    21 bottles of beer on the wall, 21 bottles of beer.  Take one down, pass it around, 20 bottles of beer on the wall.
    20 bottles of beer on the wall, 20 bottles of beer.  Take one down, pass it around, 19 bottles of beer on the wall.
    19 bottles of beer on the wall, 19 bottles of beer.  Take one down, pass it around, 18 bottles of beer on the wall.
    18 bottles of beer on the wall, 18 bottles of beer.  Take one down, pass it around, 17 bottles of beer on the wall.
    17 bottles of beer on the wall, 17 bottles of beer.  Take one down, pass it around, 16 bottles of beer on the wall.
    16 bottles of beer on the wall, 16 bottles of beer.  Take one down, pass it around, 15 bottles of beer on the wall.
    15 bottles of beer on the wall, 15 bottles of beer.  Take one down, pass it around, 14 bottles of beer on the wall.
    14 bottles of beer on the wall, 14 bottles of beer.  Take one down, pass it around, 13 bottles of beer on the wall.
    13 bottles of beer on the wall, 13 bottles of beer.  Take one down, pass it around, 12 bottles of beer on the wall.
    12 bottles of beer on the wall, 12 bottles of beer.  Take one down, pass it around, 11 bottles of beer on the wall.
    11 bottles of beer on the wall, 11 bottles of beer.  Take one down, pass it around, 10 bottles of beer on the wall.
    10 bottles of beer on the wall, 10 bottles of beer.  Take one down, pass it around, 9 bottles of beer on the wall.
    9 bottles of beer on the wall, 9 bottles of beer.  Take one down, pass it around, 8 bottles of beer on the wall.
    8 bottles of beer on the wall, 8 bottles of beer.  Take one down, pass it around, 7 bottles of beer on the wall.
    7 bottles of beer on the wall, 7 bottles of beer.  Take one down, pass it around, 6 bottles of beer on the wall.
    6 bottles of beer on the wall, 6 bottles of beer.  Take one down, pass it around, 5 bottles of beer on the wall.
    5 bottles of beer on the wall, 5 bottles of beer.  Take one down, pass it around, 4 bottles of beer on the wall.
    4 bottles of beer on the wall, 4 bottles of beer.  Take one down, pass it around, 3 bottles of beer on the wall.
    3 bottles of beer on the wall, 3 bottles of beer.  Take one down, pass it around, 2 bottles of beer on the wall.
    2 bottles of beer on the wall, 2 bottles of beer.  Take one down, pass it around, 1 bottles of beer on the wall.
    1 bottle of beer on the wall, 1 bottle of beer.  Take one down, pass it around, 0 bottles of beer on the wall  :(

    Code: Select all
    # MODIFIED
    admin_email=root@localhost
    admin_pager=root@localhost
    translate_passive_host_checks=1
    log_event_handlers=0
    use_large_installation_tweaks=1
    enable_environment_macros=0


    # NDOUtils module
    broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg


    # PNP settings - bulk mode with NCPD
    process_performance_data=1
    # service performance data
    service_perfdata_file=/usr/local/nagios/var/service-perfdata
    service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$
    service_perfdata_file_mode=a
    service_perfdata_file_processing_interval=15
    service_perfdata_file_processing_command=process-service-perfdata-file-bulk
    # host performance data
    host_perfdata_file=/usr/local/nagios/var/host-perfdata
    host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tHOSTOUTPUT::$HOSTOUTPUT$
    host_perfdata_file_mode=a
    host_perfdata_file_processing_interval=15
    host_perfdata_file_processing_command=process-host-perfdata-file-bulk


    # OBJECTS - UNMODIFIED
    #cfg_file=/usr/local/nagios/etc/objects/commands.cfg
    #cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
    #cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
    #cfg_file=/usr/local/nagios/etc/objects/templates.cfg
    #cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg


    # STATIC OBJECT DEFINITIONS (THESE DON'T GET EXPORTED/IMPORTED BY NAGIOSQL)
    cfg_dir=/usr/local/nagios/etc/static

    # OBJECTS EXPORTED FROM NAGIOSQL
    cfg_file=/usr/local/nagios/etc/contacttemplates.cfg
    cfg_file=/usr/local/nagios/etc/contactgroups.cfg
    cfg_file=/usr/local/nagios/etc/contacts.cfg
    cfg_file=/usr/local/nagios/etc/timeperiods.cfg
    cfg_file=/usr/local/nagios/etc/commands.cfg
    cfg_file=/usr/local/nagios/etc/hostgroups.cfg
    cfg_file=/usr/local/nagios/etc/servicegroups.cfg
    cfg_file=/usr/local/nagios/etc/hosttemplates.cfg
    cfg_file=/usr/local/nagios/etc/servicetemplates.cfg
    cfg_file=/usr/local/nagios/etc/servicedependencies.cfg
    cfg_file=/usr/local/nagios/etc/serviceescalations.cfg
    cfg_file=/usr/local/nagios/etc/hostdependencies.cfg
    cfg_file=/usr/local/nagios/etc/hostescalations.cfg
    cfg_file=/usr/local/nagios/etc/hostextinfo.cfg
    cfg_file=/usr/local/nagios/etc/serviceextinfo.cfg
    cfg_dir=/usr/local/nagios/etc/hosts
    cfg_dir=/usr/local/nagios/etc/services

    # GLOBAL EVENT HANDLERS
    global_host_event_handler=xi_host_event_handler
    global_service_event_handler=xi_service_event_handler



    # UNMODIFIED
    accept_passive_host_checks=1
    accept_passive_service_checks=1
    additional_freshness_latency=15
    auto_reschedule_checks=1
    auto_rescheduling_interval=30
    auto_rescheduling_window=45
    bare_update_check=0
    cached_host_check_horizon=15
    cached_service_check_horizon=15
    check_external_commands=1
    check_for_orphaned_hosts=1
    check_for_orphaned_services=1
    check_for_updates=1
    check_host_freshness=0
    check_result_path=/usr/local/nagios/var/spool/checkresults
    check_result_reaper_frequency=10
    check_service_freshness=1
    command_file=/usr/local/nagios/var/rw/nagios.cmd
    daemon_dumps_core=0
    date_format=us
    debug_file=/usr/local/nagios/var/nagios.debug
    debug_level=0
    debug_verbosity=1
    enable_event_handlers=1
    enable_flap_detection=1
    enable_notifications=1
    enable_predictive_host_dependency_checks=1
    enable_predictive_service_dependency_checks=1
    event_broker_options=-1
    event_handler_timeout=30
    execute_host_checks=1
    execute_service_checks=1
    high_host_flap_threshold=20.0
    high_service_flap_threshold=20.0
    host_check_timeout=30
    host_freshness_check_interval=60
    host_inter_check_delay_method=s
    illegal_macro_output_chars=`~$&|'"<>
    illegal_object_name_chars=`~!$%^&*|'"<>?,()=
    interval_length=60
    lock_file=/usr/local/nagios/var/nagios.lock
    log_archive_path=/usr/local/nagios/var/archives
    log_external_commands=0
    log_file=/usr/local/nagios/var/nagios.log
    log_host_retries=1
    log_initial_states=0
    log_notifications=1
    log_passive_checks=0
    log_rotation_method=d
    log_service_retries=1
    low_host_flap_threshold=5.0
    low_service_flap_threshold=5.0
    max_check_result_file_age=3600
    max_check_result_reaper_time=30
    max_concurrent_checks=0
    max_debug_file_size=1000000
    max_host_check_spread=30
    max_service_check_spread=30
    nagios_group=nagios
    nagios_user=nagios
    notification_timeout=30
    object_cache_file=/usr/local/nagios/var/objects.cache
    obsess_over_hosts=0
    obsess_over_services=0
    ocsp_timeout=5
    passive_host_checks_are_soft=0
    perfdata_timeout=5
    precached_object_file=/usr/local/nagios/var/objects.precache
    resource_file=/usr/local/nagios/etc/resource.cfg
    retained_contact_host_attribute_mask=0
    retained_contact_service_attribute_mask=0
    retained_host_attribute_mask=0
    retained_process_host_attribute_mask=0
    retained_process_service_attribute_mask=0
    retained_service_attribute_mask=0
    retain_state_information=1
    retention_update_interval=60
    service_check_timeout=60
    service_freshness_check_interval=60
    service_inter_check_delay_method=s
    service_interleave_factor=s
    soft_state_dependencies=0
    state_retention_file=/usr/local/nagios/var/retention.dat
    status_file=/usr/local/nagios/var/status.dat
    status_update_interval=10
    temp_file=/usr/local/nagios/var/nagios.tmp
    temp_path=/tmp
    use_aggressive_host_checking=0
    use_regexp_matching=0
    use_retained_program_state=1
    use_retained_scheduling_info=1
    use_syslog=1
    use_true_regexp_matching=0

    Code: Select all
    HostA
          \
           +-----Router
          /
    HostB

    This has the benefit of making the font monospace, and wrapping the contents up in individually-scrollable boxes.

    Note: Anything placed within the [­code][­/code] tags will be displayed as-written in the code box. You cannot use [­b][­/b] or other formatting marks inside a code block (it will just appear literally as [­b][­/b])

  • [­icode][­/icode] tags

    Similar to the [­code][­/code] tags above, I made [­icode][­/icode] tags to place monospace font inline with regular text. In fact, that's exactly what I just did! Instead of devoting a whole [­code][­/code] box just for the sake of making text monospace, you can use [­icode][­/icode] to achieve the same results in the middle of a sentence. This is most useful when you want to write the name of a program like top or a file like nagios.cfg since it both highlights the text and makes it more readable (Consider "il1|I!" vs il1|I!)

  • Proper quoting

    If you would like to quote someone, you can use the [­quote][­/quote] tags - Click the QUOTE button in the upper-right corner of the post you want to quote, and it will auto-fill the contents of that post into your own, wherever you have your cursor placed in your post. It will look like this:

    tmcdonald wrote:Iron Man would totally beat Captain America in a fight.

    (And yes, you may quote me on this)

    Notice that it includes my name above my quoted text.

    Sometimes you may want to just pick a specific point out of a longer post - feel free to (and please do) cut out any text not relevant to the point you wish to address. This helps keep the quoted text short and relevant, and avoids confusion. If you wish to "pick apart" a post, you can address each point in a separate [­quote][­/quote] block, and reply under each in turn.

  • Post previews

    An often-overlooked feature of the forum is the ability to preview a post before you submit it. The Preview button is right next to the Submit button, and it allows you to make sure your formatting is correct before you finalize the post.

  • Username links

    It's generally considered good manners to give credit where credit is due, so I made a [­user][­/user] tag that can be used to link to a user's post history. If @Box293 or @eloyd make a good post, I like to give them a shout-out. Simply wrap the username (without the @) in the [user][/user] tags and it will create the link and add the @ sign. It's a small gesture, but it's nice to provide proper attribution.

That's about all I have for you today. Following the first four tips will help improve the clarity of complicated posts, which greatly increases our resolution times. And the fifth is just for being nice :)

Thanks!
Former Nagios employee
tmcdonald
 
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Return to Forum Announcements

Who is online

Users browsing this forum: No registered users and 2 guests