This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

hostinterface.replacehostinterfaces

תיאור

object hostinterface.replacehostinterfaces(אובייקט פרמטרים)

שיטה זו מאפשרת להחליף את כל ממשקי המארח במארח נתון.

שיטה זו זמינה רק ל-Admin ו-Super Admin סוגי משתמשים. ניתן לבטל הרשאות לקרוא לשיטה בתפקיד משתמש הגדרות. ראה משתמש תפקידים למידע נוסף.

פרמטרים

(object) פרמטרים המכילים את המזהה של המארח שיש לעדכן ו ממשקי המארח החדשים.

פרמטר סוג תיאור
hostid
(נדרש)
string מזהה המארח שיש לעדכן.
ממשקים
(נדרש)
object/array ממשקי מארח להחלפת ממשקי המארח הנוכחיים ב.

החזר ערכים

(object) מחזירה אובייקט המכיל את המזהים של המארח שנוצר ממשקים תחת המאפיין 'interfaceids'.

דוגמאות

החלפת ממשקי מארח

החלף את כל ממשקי המארח בממשק סוכן יחיד.

בַּקָשָׁה:

{
            "jsonrpc": "2.0",
            "method": "hostinterface.replacehostinterfaces",
            "params": {
                "hostid": "30052",
                "ממשקים": {
                    "dns": "",
                    "ip": "127.0.0.1",
                    "ראשי": 1,
                    "port": "10050",
                    "סוג 1,
                    "useip": 1
                }
            },
            "auth": "038e1d7b1735c6a5436ee9eae095879e",
            "מזהה": 1
       }
Copy
✔ Copied

תְגוּבָה:

{
            "jsonrpc": "2.0",
            "תוצאה": {
                "interfaceids": [
                    "30081"
                ]
            },
            "מזהה": 1
       }
Copy
✔ Copied

ראה גם

מקור

CHostInterface::replaceHostInterfaces()‎ בתוך ui/include/classes/api/services/CHostInterface.php.

To toggle search highlight, press Ctrl+Alt+H
Have an improvement suggestion for this page? Select the text that could be improved and press Ctrl+Enter to send it to the editors.