Áú»¢¶Ä²©

This is a translation of the original English documentation page. Help us make it better.

hostprototype.get

?????

integer/array hostprototype.get(object parameters)

????? ?????? ????? ???? ????? ???? ????? ????? ???????.

???? ?? ????? ???????? ??? ???. ?????? ??? ????? ?? ????? ???? ???? ??????? ????? ??????. ??? ????? ??????? ????? ????.

???????

(object) ??????? ???????? ?? ???? ?????.

????? ????? ???????? ?????.

????? ??? ?????
hostids string/array ???? ?? ???? ????? ???? ?? ?????? ???????.
discoveryids string/array ???? ?? ?? ????? ???? ????? ????? ?-LLD ???????.
inherited boolean ?? ????? ?-'true' ???? ?? ?????? ????? ?????? ??????.
selectDiscoveryRule query ???? ?????? discoveryRule ?? ??? LLD ????? ???? ?? ?????? ?????.
selectInterfaces query ???? ?????? ?????? ?? ?????? ??????? ????? ?? ?? ????? ????.
selectGroupLinks query ???? ?????? groupLinks ?? ?????? ?????? ?? ?? ?????? ?????.
selectGroupPrototypes ?????? ???? ?????? groupPrototypes ?? ???? ?????? ?? ?????? ?? ?? ?????? ?????.
selectMacros query ???? ?????? macros ?? ?????? ????? ?? ?? ????? ????.
selectParentHost query ???? ?????? parentHost ?? ????? ????? ???? ?? ?????? ?????.
selectTags query ???? ?????? tags ?? ??? ?? ????? ????.
selectTemplates query ???? ?????? templates ?? ??????? ???????? ??? ?????? ?????.

???? ?'count'.
sortfield string/array ???? ?? ?????? ??? ????????? ???????.

????? ??????? ??: hostid, host, name ?-status.
countOutput boolean ???????? ????, ???????? ??? ????? ?-'get', ??????? ?????? ??? Generic Áú»¢¶Ä²© API information.
????? ????????
excludeSearch ??????
filter object
limit ???? ???
??? ??????
preservekeys ??????
????? ???????
searchByAny boolean
searchWildcardsEnabled boolean
sortorder ??????/????
startSearch boolean

???? ?????

(???? ???/????) ????? ???:

  • ???? ?? ?????;
  • ????? ?????????? ???????, ?? ?? ?????? countOutput ???? ?????.

???????

????? ???? ????? ???? ???? LLD

???? ?? ?? ???? ?????? ?? ?????, ?????? ?????? ????, ???? ????? ???????? ? ???? ???? LLD.

?????????:

{
            "jsonrpc": "2.0",
            "method": "hostprototype.get",
            "params": {
                "output": "??????",
                "selectInterfaces": "??????",
                "selectGroupLinks": "??????",
                "selectGroupPrototypes": "??????",
                "selectTags": "??????",
                "discoveryids": "23554"
            },
            "auth": "038e1d7b1735c6a5436ee9eae095879e",
            "????": 1
       }

????????:

{
            "jsonrpc": "2.0",
            "?????": [
                {
                    "hostid": "10092",
                    "host": "{#HV.UUID}",
                    "name": "{#HV.UUID}",
                    "status": "0",
                    "templateid": "0",
                    "discover": "0",
                    "custom_interfaces": "1",
                    "inventory_mode": "-1",
                    "????? ???????": [
                        {
                            "group_prototypeid": "4",
                            "hostid": "10092",
                            "groupid": "7",
                            "templateid": "0"
                        }
                    ],
                    "groupPrototypes": [
                        {
                            "group_prototypeid": "7",
                            "hostid": "10092",
                            "name": "{#CLUSTER.NAME}",
                            "templateid": "0"
                        }
                    ],
                    "????": [
                        {
                            "tag": "???? ??????",
                            "value": "{#DATACENTER.NAME}"
                        },
                        {
                            "tag": "??? ????",
                            "value": "{#INSTANCE_TYPE}"
                        }
                    ],
                    "??????": [
                        {
                            "main": "1",
                            "type": "2",
                            "useip": "1",
                            "ip": "127.0.0.1",
                            "dns": "",
                            "port": "161",
                            "?????": {
                                "???? 2",
                                "bulk": "1",
                                "?????": "{$SNMP_COMMUNITY}"
                            }
                        }
                    ]
                }
            ],
            "????": 1
       }

???? ????

????

CHostPrototype::get()? ???? ui/include/classes/api/services/CHostPrototype.php.