REST Reference Documentation

Common tables.

Less used and deprecated tables.

1. REFERENCE

1.1. REST Commands

The URL is in the general form https://<HOST>/rest/<COMMAND>/<COMMANDARG>.

Valid COMMANDS are check, show, add, delete, modify, restart, apply and pipecmd.

COMMAND options are added to the HTTP GET or POST query string in the form json={"option":"value"[,"option":"value"]…}.

GET requests are for operations that don’t modify data.

  • https://<HOST>/rest/

    • check/

      • nagiosconfig json={"folder":"<name>"[,"verbose":"true"]}

    • show/

      • hosttemplates json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • servicetemplates json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • hosts json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • services json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • servicesets json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • servicegroups json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • hostgroups json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • contacts json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • contactgroups json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • timeperiods json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • commands json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • servicedeps json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • hostdeps json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • serviceesc json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • hostesc json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • serviceextinfo json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

      • hostextinfo json={"folder":"<name>"[,"filter":"<regex>"][,"column":"<integer>"][,"<option>":"<value>"]*}

POST requests are for operations that might modify data or state.

  • https://<HOST>/rest/

    • add/

      • hosttemplates json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicetemplates json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hosts json={"folder":"<name>"[,"<option>":"<value>"]*}

      • services json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicesets json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicegroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostgroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • contacts json={"folder":"<name>"[,"<option>":"<value>"]*}

      • contactgroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • timeperiods json={"folder":"<name>"[,"<option>":"<value>"]*}

      • commands json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicedeps json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostdeps json={"folder":"<name>"[,"<option>":"<value>"]*}

      • serviceesc json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostesc json={"folder":"<name>"[,"<option>":"<value>"]*}

      • serviceextinfo json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostextinfo json={"folder":"<name>"[,"<option>":"<value>"]*}

    • delete/

      • hosttemplates json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicetemplates json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hosts json={"folder":"<name>"[,"<option>":"<value>"]*}

      • services json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicesets json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicegroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostgroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • contacts json={"folder":"<name>"[,"<option>":"<value>"]*}

      • contactgroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • timeperiods json={"folder":"<name>"[,"<option>":"<value>"]*}

      • commands json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicedeps json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostdeps json={"folder":"<name>"[,"<option>":"<value>"]*}

      • serviceesc json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostesc json={"folder":"<name>"[,"<option>":"<value>"]*}

      • serviceextinfo json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostextinfo json={"folder":"<name>"[,"<option>":"<value>"]*}

    • modify/

      • hosttemplates json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicetemplates json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hosts json={"folder":"<name>"[,"<option>":"<value>"]*}

      • services json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicesets json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicegroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostgroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • contacts json={"folder":"<name>"[,"<option>":"<value>"]*}

      • contactgroups json={"folder":"<name>"[,"<option>":"<value>"]*}

      • timeperiods json={"folder":"<name>"[,"<option>":"<value>"]*}

      • commands json={"folder":"<name>"[,"<option>":"<value>"]*}

      • servicedeps json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostdeps json={"folder":"<name>"[,"<option>":"<value>"]*}

      • serviceesc json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostesc json={"folder":"<name>"[,"<option>":"<value>"]*}

      • serviceextinfo json={"folder":"<name>"[,"<option>":"<value>"]*}

      • hostextinfo json={"folder":"<name>"[,"<option>":"<value>"]*}

    • restart/

      • nagios json={"folder":"<name>"}

    • apply/

      • nagiosconfig json={"folder":"<name>"[,"verbose":"true"]}

      • nagioslastgoodconfig json={"folder":"<name>"}

    • pipecmd/

      • enablehostsvcchecks json={"folder":"<name>","name":"<hostname>}

      • disablehostsvcchecks json={"folder":"<name>","name":"<hostname>" [,"comment","<comment>"]}

      • enablesvccheck json={"folder":"<name>","name":"<hostname>, "svcdesc":"<Service Description>" [,"comment","<comment>"]}

      • disablesvccheck json={"folder":"<name>","name":"<hostname>" "svcdesc":"<Service Description>" [,"comment","<comment>"]}

      • schedhstdowntime json={"folder":"<name>","name":"<hostname>,"starttime":"<unixtime>","endtime":"unixtime" [,"flexible":"<0|1>","duration":"<minutes>","author":"<name>","comment","<comment>"]}

      • delhstdowntime json={"folder":"<name>","name":"<hostname>,"svcdesc":"<Service Description>" [,"comment","<comment>"]}

      • schedhstsvcdowntime json={"folder":"<name>","name":"<hostname>","svcdesc":"<Service Description>" [,"comment","<comment>"]}

      • delhstsvcdowntime json={"folder":"<name>","name":"<hostname>","svcdesc":"<Service Description>" [,"comment","<comment>"]}

      • schedsvcdowntime json={"folder":"<name>","name":"<hostname>","svcdesc":"<Service Description>" [,"comment","<comment>"]}

      • delsvcdowntime json={"folder":"<name>","name":"<hostname>","svcdesc":"<Service Description>" [,"comment","<comment>"]}

1.2. Object Definitions and Options

Refer to the Nagios object definitions documentation for more information about individual options in the following tables. It can be found at the following URL:

1.2.1. Listings of all Valid REST Options

The ‘Column’ number in the following tables relate to the column number in the database files on the nagios server. These are comma delimited files used by csv2nag to create the nagios configuration files.

Key for the ‘Flags’ column:

  • 'U' - The option is Unimplemented.

  • 'E' - The field should be URL encoded.

  • 'R' - A required field.

  • 'K' - A key field. Required to uniquely identify an entry.

  • 'L' - A list field. Lists consist of zero or more items separated by spaces.

  • 'C' - A compound field: <name>|<value>[,<name>|<value>]…

  • 'X' - Not available in the Web front-end.

  • 'M' - Name mangling is applied to a passive-only nagios server. (Where the DCC variable is set to ‘1’ in /etc/nagrestconf/csv2nag.conf.)

The ‘REST variable name’ column lists the option names that can be used in the ‘json=’ part of the query. These names are used in place of ‘<option>’ shown in the ‘Rest Commands’ section above.

1.2.2. contacts

Column Description Flags REST variable name Nagios argument name

1.

Contact name

RKM

name

contact_name

2.

Use

M

use

use

3.

Alias pretty name

R

alias

alias

4.

Email address

emailaddr

email

5.

Service notification period

RM

svcnotifperiod

service_notification_period

6.

Service notification options

LR

svcnotifopts

service_notification_options

7.

Service notification commands

LRM

svcnotifcmds

service_notification_commands

8.

Host notification period

RM

hstnotifperiod

host_notification_period

9.

Host notification options

LR

hstnotifopts

host_notification_options

10.

Host notification commands

LRM

hstnotifcmds

host_notification_commands

11.

Can submit commands

cansubmitcmds

can_submit_commands

12.

Disable

U

disable

13.

Service notification enabled

svcnotifenabled

service_notifications_enabled

14.

Host notification enabled

hstnotifenabled

host_notifications_enabled

15.

Pager

pager

pager

16.

Address1

X

address1

address1

17.

Address2

X

address2

address2

18.

Address3

X

address3

address3

19.

Address4

X

address4

address4

20.

Address5

X

address5

address5

21.

Address6

X

address6

address6

22.

Retain status info

retainstatusinfo

retain_status_information

23.

Retain non-status info

retainnonstatusinfo

retain_nonstatus_information

24.

Contact groups

XLM

contactgroups

contactgroups

1.2.3. contactgroups

Column Description Flags REST variable name Nagios argument name

1.

Contact group name

RKM

name

contactgroup_name

2.

Alias pretty name

R

alias

alias

3.

Members list

RLM

members

members

4.

Disable

U

disable

1.2.4. hosts

Column Description Flags REST variable name Nagios argument name

1.

Host name

RK

name

host_name

2.

Alias

RE

alias

alias

3.

IP Address

R

ipaddress

address

4.

Host Template

RM

template

use

5.

Shown Hostgroup

LM

hostgroup

hostgroups

6.

Contacts

LM

contacts

contacts

7.

Contact Group

LM

contactgroups

contact_groups

8.

Active checks

activechecks

active_checks_enabled

9.

Service Set

L

servicesets

N/A

10.

Disable [0,1,2]

disable

N/A

11.

Display name

X

displayname

display_name

12.

Parents

LXM

parents

parents

13.

Check command

ME

command

check_command

14.

Initial state

X

initialstate

initial_state

15.

Max check attempts

maxcheckattempts

max_check_attempts

16.

Check interval

X

checkinterval

check_interval

17.

Retry interval

X

retryinterval

retry_interval

18.

Passive checks enabled

X

passivechecks

passive_checks_enabled

19.

Check period

XM

checkperiod

check_period

20.

Obsess over host

X

obsessoverhost

obsess_over_host

21.

Check freshness

X

checkfreshness

check_freshness

22.

Freshness threshold

X

freshnessthresh

freshness_threshold

23.

Event handler

X

eventhandler

event_handler

24.

Event handler enabled

X

eventhandlerenabled

event_handler_enabled

25.

Low flap threshold

X

lowflapthresh

low_flap_threshold

26.

High flap threshold

X

highflapthresh

high_flap_threshold

27.

Flap detection enabled

X

flapdetectionenabled

flap_detection_enabled

28.

Flap detection options

LX

flapdetectionoptions

flap_detection_options

29.

Process perf data

X

processperfdata

process_perf_data

30.

Retain status information

retainstatusinfo

retain_status_information

31.

Retain nonstatus information

retainnonstatusinfo

retain_nonstatus_information

32.

Notification interval

X

notifinterval

notification_interval

33.

First notification delay

X

firstnotifdelay

first_notifdelay

34.

Notification period

XM

notifperiod

notification_period

35.

Notification opts

LX

notifopts

notification_options

36.

Notifications enabled

X

notifications_enabled

notifications_enabled

37.

Stalking options

LX

stalkingoptions

stalking_options

38.

Notes

X

notes

notes

39.

Notes url

X

notes_url

notes_url

40.

Icon image

X

icon_image

icon_image

41.

Icon image alt

X

icon_image_alt

icon_image_alt

42.

Vrml image

X

vrml_image

vrml_image

43.

Statusmap image

X

statusmap_image

statusmap_image

44.

2d coords

X

coords2d

2d_coords

45.

3d coords

X

coords3d

3d_coords

46.

Action url

X

action_url

action_url

47.

Custom variable

C

customvars

N/A

Note When using '/show/hosts' the contacts field is output as 'contact', without the 's', but set with 'contacts', with the 's' as shown above.

1.2.5. hosttemplates

Column Description Flags REST variable name Nagios argument name

1.

Name

RKM

name

name

2.

Use

M

use

use

3.

Contacts

LM

contacts

contacts

4.

Contact groups

LM

contactgroups

contact_groups

5.

Normal check interval

U

normchecki

normchecki

6.

Check interval

R

checkinterval

check_interval

7.

Retry interval

R

retryinterval

retry_interval

8.

Notification period

RM

notifperiod

notification_period

9.

Notification option

L

notifopts

notification_options

10.

Disable

U

disable

11.

Check period

RM

checkperiod

check_period

12.

Max check attempts

R

maxcheckattempts

max_check_attempts

13.

Check command

ME

checkcommand

check_command

14.

Notification interval

R

notifinterval

notification_interval

15.

Passive checks enabled

passivechecks

passive_checks_enabled

16.

Obsess over host

X

obsessoverhost

obsess_over_host

17.

Check freshness

X

checkfreshness

check_freshness

18.

Freshness threshold

X

freshnessthresh

freshness_threshold

19.

Event handler

X

eventhandler

event_handler

20.

Event handler enabled

X

eventhandlerenabled

event_handler_enabled

21.

Low flap threshold

X

lowflapthresh

low_flap_threshold

22.

High flap threshold

X

highflapthresh

high_flap_threshold

23.

Flap detection enabled

X

flapdetectionenabled

flap_detection_enabled

24.

Flap detection options

LX

flapdetectionoptions

flap_detection_options

25.

Process perf data

X

processperfdata

process_perf_data

26.

Retain status information

retainstatusinfo

retain_status_information

27.

Retain nonstatus information

retainnonstatusinfo

retain_nonstatus_information

28.

First notification delay

X

firstnotifdelay

first_notifdelay

29.

Notifications enabled

notifications_enabled

notifications_enabled

30.

Stalking options

LX

stalkingoptions

stalking_options

31.

Notes

notes

notes

32.

Notes url

X

notes_url

notes_url

33.

Icon image

icon_image

icon_image

34.

Icon image alt

icon_image_alt

icon_image_alt

35.

Vrml image

X

vrml_image

vrml_image

36.

Statusmap image

statusmap_image

statusmap_image

37.

2d coords

X

coords2d

2d_coords

38.

3d coords

X

coords3d

3d_coords

39.

Action url

E

action_url

action_url

40.

Custom variable

C

customvars

N/A

1.2.6. services

Column Description Flags REST variable name Nagios argument name

1.

Name

RKE

name

host_name

2.

Service template

RM

template

use

3.

Service command

RME

command

check_command

4.

Service description

RKE

svcdesc

service_description

5.

Service groups

L

svcgroup

servicegroups

6.

Contacts

LM

contacts

contacts

7.

Contact groups

LM

contactgroups

contact_groups

8.

Freshness threshold (auto)*

freshnessthresh

N/A

9.

Active checks enabled

activechecks

active_checks_enabled

10.

Custom variables

C

customvars

N/A

11.

Disable[0,1,2]

disable

12.

Display name

X

displayname

display_name

13.

Is volatile

X

isvolatile

is_volatile

14.

Initial state

X

initialstate

initial_state

15.

Max check attempts

maxcheckattempts

max_check_attempts

16.

Check interval

checkinterval

check_interval

17.

Retry interval

retryinterval

retry_interval

18.

Passive checks enabled

passivechecks

passive_checks_enabled

19.

Check period

XM

checkperiod

check_period

20.

Obsess over service

X

obsessoverservice

obsess_over_service

21.

Freshness threshold (manual)

manfreshnessthresh

freshness_threshold

22.

Check Freshness

checkfreshness

check_freshness

23.

Event handler

X

eventhandler

event_handler

24.

Event handler enabled

X

eventhandlerenabled

event_handler_enabled

25.

Low flap threshold

X

lowflapthresh

low_flap_threshold

26.

High flap threshold

X

highflapthresh

high_flap_threshold

27.

Flap detection enabled

X

flapdetectionenabled

flap_detection_enabled

28.

Flap detection options

LX

flapdetectionoptions

flap_detection_options

29.

Process perf data

X

processperfdata

process_perf_data

30.

Retain status information

retainstatusinfo

retain_status_information

31.

Retain nonstatus information

retainnonstatusinfo

retain_nonstatus_information

32.

Notification interval

X

notifinterval

notification_interval

33.

First notification delay

X

firstnotifdelay

first_notifdelay

34.

Notification period

XM

notifperiod

notification_period

35.

Notification opts

LX

notifopts

notification_options

36.

Notifications enabled

X

notifications_enabled

notifications_enabled

37.

Stalking options

LX

stalkingoptions

stalking_options

38.

Notes

X

notes

notes

39.

Notes url

X

notes_url

notes_url

40.

Action url

X

action_url

action_url

41.

Icon image

X

icon_image

icon_image

42.

Icon image alt

X

icon_image_alt

icon_image_alt

43.

Vrml image

X

vrml_image

vrml_image

44.

Statusmap image

X

statusmap_image

statusmap_image

45.

2d coords

X

coords2d

2d_coords

46.

3d coords

X

coords3d

3d_coords

* Freshness thresh (auto) also sets check_command to no-checks-received, active_checks_enabled to 0 (depending on whether the host is a dcc or not), passive_checks_enabled to 1 and check_freshness to 1. Use manfreshnessthresh to restrict to only setting the freshness_threshold.

1.2.7. servicesets

Column Description Flags REST variable name Nagios argument name

1.

Serviceset name

RKE

name

N/A

2.

Service template

R

template

use

3.

Service command

RE

command

check_command

4.

Service description

RK

svcdesc

service_description

5.

Service groups

L

svcgroup

servicegroups

6.

Contacts

L

contacts

contacts

7.

Contact groups

L

contactgroups

contact_groups

8.

Freshness threshold (auto)*

freshnessthresh

N/A

9.

Active checks

activechecks

active_checks_enabled

10.

Custom variables

C

customvars

N/A

11.

Disable

U

disable

12.

Display name

X

displayname

display_name

13.

Is volatile

X

isvolatile

is_volatile

14.

Initial state

X

initialstate

initial_state

15.

Max check attempts

maxcheckattempts

max_check_attempts

16.

Check interval

checkinterval

check_interval

17.

Retry interval

retryinterval

retry_interval

18.

Passive checks enabled

passivechecks

passive_checks_enabled

19.

Check period

X

checkperiod

check_period

20.

Obsess over service

X

obsessoverservice

obsess_over_service

21.

Freshness threshold (manual)

manfreshnessthresh

freshness_threshold

22.

Check Freshness

checkfreshness

check_freshness

23.

Event handler

X

eventhandler

event_handler

24.

Event handler enabled

X

eventhandlerenabled

event_handler_enabled

25.

Low flap threshold

X

lowflapthresh

low_flap_threshold

26.

High flap threshold

X

highflapthresh

high_flap_threshold

27.

Flap detection enabled

X

flapdetectionenabled

flap_detection_enabled

28.

Flap detection options

LX

flapdetectionoptions

flap_detection_options

29.

Process perf data

X

processperfdata

process_perf_data

30.

Retain status information

retainstatusinfo

retain_status_information

31.

Retain nonstatus information

retainnonstatusinfo

retain_nonstatus_information

32.

Notification interval

X

notifinterval

notification_interval

33.

First notification delay

X

firstnotifdelay

first_notifdelay

34.

Notification period

X

notifperiod

notification_period

35.

Notification opts

LX

notifopts

notification_options

36.

Notifications enabled

X

notifications_enabled

notifications_enabled

37.

Stalking options

LX

stalkingoptions

stalking_options

38.

Notes

X

notes

notes

39.

Notes url

X

notes_url

notes_url

40.

Action url

X

action_url

action_url

41.

Icon image

X

icon_image

icon_image

42.

Icon image alt

X

icon_image_alt

icon_image_alt

43.

Vrml image

X

vrml_image

vrml_image

44.

Statusmap image

X

statusmap_image

statusmap_image

45.

2d coords

X

coords2d

2d_coords

46.

3d coords

X

coords3d

3d_coords

* Freshness thresh (auto) also sets check_command to no-checks-received, active_checks_enabled to 0 (depending on whether the host is a dcc or not), passive_checks_enabled to 1 and check_freshness to 1. Use manfreshnessthresh to restrict to only setting the freshness_threshold.

1.2.8. servicetemplates

Column Description Flags REST variable name Nagios argument name

1.

Name

RKM

name

name

2.

Use

XM

use

use

3.

Contacts

LM

contacts

contacts

4.

Contact groups

LM

contactgroups

contact_groups

5.

Notification options

L

notifopts

notification_options

6.

Check interval

R

checkinterval

check_interval

7.

Normal check interval

U

normchecki

normchecki

8.

Retry interval

R

retryinterval

retry_interval

9.

Notification interval

R

notifinterval

notification_interval

10.

Notification period

RM

notifperiod

notification_period

11.

Disable

U

disable

12.

Check period

RM

checkperiod

check_period

13.

Max check attempts

R

maxcheckattempts

max_check_attempts

14.

Freshness threshold (auto)*

freshnessthresh

N/A

15.

Active checks

activechecks

active_checks_enabled

16.

Custom variables

C

customvars

17.

Is volatile

X

isvolatile

is_volatile

18.

Initial state

X

initialstate

initial_state

19.

Passive checks enabled

passivechecks

passive_checks_enabled

20.

Obsess over service

X

obsessoverservice

obsess_over_service

21.

Freshness threshold (manual)

X

manfreshnessthresh

freshness_threshold

22.

Check Freshness

X

checkfreshness

check_freshness

23.

Event handler

X

eventhandler

event_handler

24.

Event handler enabled

X

eventhandlerenabled

event_handler_enabled

25.

Low flap threshold

X

lowflapthresh

low_flap_threshold

26.

High flap threshold

X

highflapthresh

high_flap_threshold

27.

Flap detection enabled

X

flapdetectionenabled

flap_detection_enabled

28.

Flap detection options

LX

flapdetectionoptions

flap_detection_options

29.

Process perf data

X

processperfdata

process_perf_data

30.

Retain status information

X

retainstatusinfo

retain_status_information

31.

Retain nonstatus information

X

retainnonstatusinfo

retain_nonstatus_information

32.

First notification delay

X

firstnotifdelay

first_notifdelay

33.

Notifications enabled

notifications_enabled

notifications_enabled

34.

Stalking options

LX

stalkingoptions

stalking_options

35.

Notes

notes

notes

36.

Notes url

X

notes_url

notes_url

37.

Action url

E

action_url

action_url

38.

Icon image

icon_image

icon_image

39.

Icon image alt

icon_image_alt

icon_image_alt

40.

Vrml image

X

vrml_image

vrml_image

41.

Statusmap image

statusmap_image

statusmap_image

42.

2d coords

X

coords2d

2d_coords

43.

3d coords

X

coords3d

3d_coords

* Freshness thresh (auto) also sets check_command to no-checks-received, active_checks_enabled to 0 (depending on whether the host is a dcc or not), passive_checks_enabled to 1 and check_freshness to 1. Use manfreshnessthresh to restrict to only setting the freshness_threshold.

1.2.9. commands

Column Description Flags REST variable name Nagios argument name

1.

Command name

RKME

name

command_name

2.

Command line

RE

command

command_line

3.

Disable

U

disable

N/A

1.2.10. hostgroups

Column Description Flags REST variable name Nagios argument name

1.

Hostgroup name

RKM

name

hostgroup_name

2.

Alias

R

alias

alias

3.

Disable

disable

N/A

4.

Members

LX

members

members

5.

Hostgroup members

LXM

hostgroupmembers

hostgroup_members

6.

Notes

X

notes

notes

7.

Notes url

X

notes_url

notes_url

8.

Action url

X

action_url

action_url

1.2.11. servicegroups

Column Description Flags REST variable name Nagios argument name

1.

Servicegroup name

RK

name

servicegroup_name

2.

Alias

R

alias

alias

3.

Disable

U

disable

N/A

4.

Members

LX

members

members

5.

Servicegroup members

LX

servicegroupmembers

servicegroup_members

6.

Notes

X

notes

notes

7.

Notes url

X

notes_url

notes_url

8.

Action url

X

action_url

action_url

1.2.12. timeperiods

Column Description Flags REST variable name Nagios argument name

1.

Timeperiod name

RKM

name

timeperiod_name

2.

Alias

R

alias

alias

3.

Freestyle time definition

C

definition

4.

Timeperiod to exclude

LM

exclude

exclude

5.

Disable

U

disable

N/A

6.

Freestyle time exception

CXM

exception

1.2.13. servicedeps

Column Description Flags REST variable name Nagios argument name

1.

Dependent host name

RKX

dephostname

dependent_host_name

2.

Dependent hostgroup name

KXM

dephostgroupname

dependent_hostgroup_name

3.

Dependent service description

RKX

depsvcdesc

dependent_service_description

4.

Host name

RKX

hostname

host_name

5.

Hostgroup name

KXM

hostgroupname

hostgroup_name

6.

Service description

RKX

svcdesc

service_description

7.

Inherits parent

X

inheritsparent

inherits_parent

8.

Execution failure criteria

LX

execfailcriteria

execution_failure_criteria

9.

Notification failure criteria

LX

notiffailcriteria

notification_failure_criteria

10.

Dependency period

XM

period

dependency_period

11.

Disable

X

disable

N/A

Note Rows 1,2,4 and 5 are not lists in REST as they are in a Nagios configuration file. One of rows 1 and 2 plus one of rows 4 and 5 are required.

1.2.14. hostdeps

Column Description Flags REST variable name Nagios argument name

1.

Dependent host name

RKX

dephostname

dependent_host_name

2.

Dependent hostgroup name

KXM

dephostgroupname

dependent_hostgroup_name

3.

Host name

RKX

hostname

host_name

4.

Hostgroup name

KXM

hostgroupname

hostgroup_name

5.

Inherits parent

RX

inheritsparent

inherits_parent

6.

Execution failure criteria

LRX

execfailcriteria

execution_failure_criteria

7.

Notification failure criteria

LRX

notiffailcriteria

notification_failure_criteria

8.

Dependency period

RXM

period

dependency_period

9.

Disable

UX

disable

N/A

Note Columns 1 and 2 are not lists in REST as they are in a Nagios configuration file.

1.2.15. serviceescalation

Column Description Flags REST variable name Nagios argument name

1.

Host name

KRX

hostname

host_name

2.

Hostgroup name

XM

hostgroupname

hostgroup_name

3.

Service description

KRX

svcdesc

service_description

4.

Contacts

LRXM

contacts

contacts

5.

Contact groups

LRM

contactgroups

contact_groups

6.

First notification

RX

firstnotif

first_notification

7.

Last notification

RX

lastnotif

last_notification

8.

Notification interval

RX

notifinterval

notification_interval

9.

Escalation period

XM

period

escalation_period

10.

Escalation options

LX

escopts

escalation_options

11.

Disable

X

disable

N/A

1.2.16. hostescalation

Column Description Flags REST variable name Nagios argument name

1.

Host name

KRX

hostname

host_name

2.

Hostgroup name

XM

hostgroupname

hostgroup_name

3.

Contacts

LRXM

contacts

contacts

4.

Contact groups

LRM

contactgroups

contact_groups

5.

First notification

RX

firstnotif

first_notification

6.

Last notification

RX

lastnotif

last_notification

7.

Notification interval

RX

notifinterval

notification_interval

8.

Escalation period

XM

period

escalation_period

9.

Escalation options

LX

escopts

escalation_options

10.

Disable

X

disable

N/A

1.2.17. serviceextinfo

Column Description Flags REST variable name Nagios argument name

1.

Host name

RX

hostname

host_name

2.

Service description

X

svcdesc

service_description

3.

Notes

X

notes

notes

4.

Notes url

X

notes_url

notes_url

5.

Action url

X

action_url

action_url

6.

Icon image

X

icon_image

icon_image

7.

Icon image alt

X

icon_image_alt

icon_image_alt

8.

Disable

X

disable

N/A

1.2.18. hostextinfo

Column Description Flags REST variable name Nagios argument name

1.

Host name

RX

hostname

host_name

2.

Notes

X

notes

notes

3.

Notes url

X

notes_url

notes_url

4.

Action url

X

action_url

action_url

5.

Icon image

X

icon_image

icon_image

6.

Icon image alt

X

icon_image_alt

icon_image_alt

7.

Vrml image

X

vrml_image

vrml_image

8.

Statusmap image

X

statusmap_image

statusmap_image

9.

2d coords

X

coords2d

2d_coords

10.

3d coords

X

coords3d

3d_coords

11.

Disable

X

disable

N/A

1.2.19. enablehostsvcchecks

Enables active checks for the host then enables all passive and active service checks for the host. The following nagios pipe commands are sent:

ENABLE_HOST_CHECK
ENABLE_PASSIVE_SVC_CHECKS
ENABLE_SVC_CHECK
Column Description Flags REST variable name Nagios argument name

N/a.

Host name

RX

name

N/A

1.2.20. disablehostsvcchecks

Disables active checks for the host then disables all passive and active service checks for the host. Status is changed to green for the host and all of its service checks and the comment is set. The following nagios pipe commands are sent:

DISABLE_HOST_CHECK
DISABLE_HOST_SVC_CHECKS
PROCESS_SERVICE_CHECK_RESULT   <-- Sets the comment and service status
... 10 second sleep ...
DISABLE_PASSIVE_SVC_CHECKS
Column Description Flags REST variable name Nagios argument name

N/a.

Host name

RX

name

N/A

N/a.

Comment for the Nagios GUI

X

comment

N/A

1.2.21. enablesvccheck

Enables an individual service check and optionally sets a comment otherwise the default comment will be used: "Un-disabled via REST. Check scheduled.". The following nagios pipe commands are sent:

ENABLE_PASSIVE_SVC_CHECKS
ENABLE_SVC_CHECK
PROCESS_SERVICE_CHECK_RESULT
Column Description Flags REST variable name Nagios argument name

N/a.

Host name

RX

name

N/A

N/a.

Service description

RX

svcdesc

N/A

N/a.

Comment for the Nagios GUI

X

comment

N/A

1.2.22. disablesvccheck

Disables an individual service check and optionally sets a comment otherwise the default comment will be used: "Disabled via REST interface.". The following nagios pipe commands are sent:

DISABLE_SVC_CHECK
PROCESS_SERVICE_CHECK_RESULT
DISABLE_PASSIVE_SVC_CHECKS
Column Description Flags REST variable name Nagios argument name

N/a.

Host name

RX

name

N/A

N/a.

Service description

RX

svcdesc

N/A

N/a.

Comment for the Nagios GUI

X

comment

N/A

1.2.23. schedhstdowntime

Schedule fixed or flexible downtime for a host. The following nagios pipe commands are sent:

SCHEDULE_HOST_DOWNTIME
Column Description Flags REST variable name Nagios argument name

N/a.

Host name

RX

name

N/A

N/a.

Start time [unix time]

RX

starttime

N/A

N/a.

End time [unix time]

RX

endtime

N/A

N/a.

Flexible downtime [0|1]

X

flexible

N/A

N/a.

Duration (flexible downtime in minutes)

X

duration

N/A

N/a.

Comment for the Nagios GUI*

X

comment

N/A

N/a.

Author

X

author

N/A

* If comment is not supplied then the default comment, “Scheduled via the REST interface.”, is used.

1.2.24. delhstdowntime

Delete all scheduled downtime for a host. The following nagios pipe commands are sent:

DEL_HOST_DOWNTIME
Column Description Flags REST variable name Nagios argument name

N/a.

Host name

RX

name

N/A

1.2.25. schedulehostsvcdowntime

Schedule fixed or flexible downtime for a host and all its services.

1.2.26. delhostsvcdowntime

Delete all scheduled downtime for a host and all its services.

1.2.27. schedulesvcdowntime

Schedule fixed or flexible downtime for a host.

1.2.28. delsvcdowntime

Delete all scheduled downtime for a host.