codecamp

用户管理

用户组列表

[root@Linux ~]# zabbix_api usergroup_get --table
1.2.2
+----------+---------------------------+------------+--------------+-------+
| usrgrpid | name                      | gui_access | users_status | users |
+----------+---------------------------+------------+--------------+-------+
| 7        | Zabbix administrators     | 0          | 0            | Admin |
| 8        | Guests                    | 0          | 0            | guest |
| 9        | Disabled                  | 0          | 1            |       |
| 11       | Enabled debug mode        | 0          | 0            |       |
| 12       | No access to the frontend | 2          | 0            |       |
| 13       | op                        | 0          | 0            | op    |
+----------+---------------------------+------------+--------------+-------+
sum:  6

创建用户组

[root@Linux ~]# zabbix_api usergroup_create "ceshi_usergroup" "Linux servers"
1.2.2
{"status": "OK", "output": "create usergroup:[ceshi_usergroup] id:[18] is OK"}

删除用户组

[root@Linux ~]# zabbix_api usergroup_delete "ceshi_usergroup"
1.2.2
{"status": "OK", "output": "delete usergroup [ceshi_usergroup] OK"}

用户列表

[root@Linux ~]#zabbix_api user_get --table
1.2.2
+--------+-------+--------+-----+
| userid | alias | name   | url |
+--------+-------+--------+-----+
| 1      | Admin | Zabbix |     |
| 2      | guest |        |     |
| 3      | op    |        |     |
+--------+-------+--------+-----+
sum:  3

创建用户

[root@Linux ~]#zabbix_api user_create "ceshi_user4" "123456" "op" "alerts" "meetbill@163.com"
1.2.2
{"status": "OK", "output": "create user:[ceshi_user4] id:[8] OK"}

删除用户

[root@Linux ~]#zabbix_api user_delete ceshi_user4
1.2.2
{"status": "OK", "output": "delete user:[ceshi_user4] id:[8] OK"}

host管理
mediatype(报警方式)管理
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }