Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Zabbix handheld operation and maintenance

Shulou Source: shulou.com Published: 2022-06-01 06:31:44 10月03日 Update

Recently, we have written a handheld operation and maintenance system combined with zabbix, which can realize ping, graphical viewing of zabbix monitoring items, server specified commands (such as shutdown, restart process, etc.), IPMI name (remote management card shutdown, restart, BMC restart, etc.), VM-esxi (esxi virtualization management to restart virtual machines, shutdown, etc.).

It is mainly written by CI (php MVC framework) and jqmobile (mobile framework of js). APP has also been completed.

Http://blog.chinaunix.net/uid-12765590-id-4622226.html

Installation method

First install zabbix, there are many online tutorials, I will not elaborate.

Here is how to deploy handheld OPS:

Download the code:

Https://github.com/dongfangyiye/zsyw

Download the complete code and copy it to the root directory of the zabbix page, and remember to include the zsyw directory.

Modify the configuration:

Modify zsyw/application/config/config.php

find

$config ['base_url'] =' http://IP/zsyw/'

Modify to

$config ['base_url'] =' http:// the IP or domain name / zsyw/' of your own server

Change the database password:

Modify zsyw/application/config/database.php

$db ['default'] [' hostname'] = 'localhost'

$db ['default'] [' username'] = 'root'

$db ['default'] [' password'] = 'your zabbix database password'

$db ['default'] [' database'] = 'zabbix'

$db ['default'] [' dbdriver'] = 'mysql'

Add database tables to the zabbix database:

CREATE TABLE `cm_ roomy` (

`history_ id` int (11) NOT NULL auto_increment

`name` varchar (50) default NULL

`sipp` varchar (50) default NULL

`runcommand` varchar (50) default NULL

`output` varchar (50) default NULL

`status` varchar (50) default NULL

`ipaddress` varchar (50) default NULL

`sname` varchar (50) default NULL

`stamp`varchar (50) NOT NULL default''

PRIMARY KEY (`history_ id`)

) ENGINE=MyISAM AUTO_INCREMENT=676 DEFAULT CHARSET=utf8

All right, it's done, and now you can achieve two functions: ping and monitoring project graphics (currently written dead to consider the configuration form in the later stage of the project), server commands, IPMI, VMESXI need to be configured separately.

The code for Android phone APP:

Https://github.com/dongfangyiye/webview_zsyw

In addition, the default admin of zabbix is not associated with a machine group, so you need to create a new account to associate with the host group. If you have any questions, you can communicate with me.

Landing

PING

Zabbix Monitoring Graph

Tags: Data database code graphics server service monitoring configuration command password method framework project association management done host function domain name great work Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info OPPO Reno MySQL vpn