CMDB Cabinet platform combined with Zabbix alarm display

Source: Internet
Author: User
Tags saltstack

Dragon fruit operation and maintenance Platform Deployment tutorial

Integrate Zabbix graphics into the operations platform

Abstract: Zabbix Installation Chapter

Deploy Zabbix-client-side practices based on Saltstack automation

Application based on Zabbix built-in key

Zabbix actual combat--zabbix trigger expression

Zabbix combat--zabbix based on mail alarm configuration

Zabbix actual combat--PHP-FPM monitoring detailed

Zabbix actual combat--mysql monitoring detailed

Zabbix actual combat--memcached,redis monitoring detailed

Zabbix actual combat--combining saltstack push to customize key practice

Zabbix3.0 Introduction to the Production Environment Application video tutorial:

Http://www.roncoo.com/course/view/fb3050a5b34b42f39ccad83ebebc89c1

Dragon fruit operation and maintenance Platform open source project address:

Https://github.com/roncoo/roncoo-cmdb

Recently saw Liu Tians teacher's cabinet display platform, very gorgeous, and there is a large screen display can also reflect the value of operation and maintenance, here is the next I am doing some data of the CMDB platform:

CMDB data:

Computer room, cabinet, cabinet power supply, cabinet location, machine room contract, contract expiry time, contact person in the computer room.

Server, CPU, hard disk, whether virtualization, host, RAID type, memory.

Asset ID, listed date, bottom shelf record, Server Agent, Agent contact, server to warranty date.

IP address, MAC address, line of business, product line, operating system.

Communication This major technology JSON-RPC, and then provide API interface to program calls, in a fixed format to import, hardware fixed information, such as IP,MAC, hard disk and other information, through the automatic collection of API post to add to the data table. Like computer room information, cabinets and the like can give a copy of the computer room Excel form and then directly import.

Computer room server display: Through the Liu Tians teacher cabinet temporary platform of the front end to take over, and then combined into the table structure inside the display; When the fault alarm, left a warning interface API, through the Zabbix to send the alarm data to the operation and maintenance platform; Operation and maintenance platform Storage alarm display: The following is the front-end simple display effect, Here's how:

Front-end Cabinet generation effect display: blink effect directly get the manufacturer's GIF file call can, cabinet naming mode such as the following: 5-6,5-7 on the fifth row sixth, seventh cabinet:

The above is normal display, when the failure occurs: The combination of Zabbix alarm script, send the past to the interface, the fault is as follows:

The mouse moves to the enclosure to display information about the server:

Zabbix the alarm script and sends the status to the operations platform, and changes the server status:

[email protected] alertscripts]# cat zabbix_alert.py

#!/usr/bin/python

#coding: Utf-8

Import Requests,json

Import Smtplib

From Email.mime.text import Mimetext

Import Sys

#邮箱服务器地址

Mail_host = ' smtp.163.com '

#邮箱用户名

Mail_user = ' [email protected] '

#邮箱密码

Mail_pass = ' xxxxxx123456 '

Mail_postfix = ' 163.com '

def send_mail (to_list,subject,content):

me = mail_user+ "

msg = Mimetext (content)

msg[' Subject '] = Subject

Msg[' from '] = Me

Msg[' to '] = To_list

Try

s = smtplib. SMTP ()

S.connect (Mail_host)

S.login (Mail_user,mail_pass)

S.sendmail (me,to_list,msg.as_string ())

S.close ()

Return True

Except Exception,e:

Print str (e)

Return False

DEF alert (message):

headers = {"Content-type": "Application/json"}

data = {}

res = {}

data[' status ' = Message

res[' params ']=data

res[' jsonrpc '] = "2.0"

res["id"] = 1

Res["Method"]= "Alert.turn"

url = "Http://192.168.63.216:2000/api"

r = Requests.post (URL, headers=headers,json=res)

if __name__ = = "__main__":

Send_mail (Sys.argv[1], sys.argv[2], sys.argv[3])

Alert (sys.argv[2])

Back end return status changes directly after the storage modification, my side just to determine whether the subject is problem or OK:

The front-end code can be changed to jquery according to Liu Tians Teacher's and then the front-end can go free to play, the following simple example:

<table border= "0" cellpadding= "1" cellspacing= "0" height= "by" width= "99%" >

<tbody><tr>

<TD class= "jgtable" align= "center" height= "" valign= "bottom" ><font class= "Jgtitle" >01</font> </td></tr>

<TD class= "jgtable" align= "center" height= "" valign= "Bottom" >&nbsp;

</td>

</tr>

<tr>

<TD class= "jgtable" align= "center" height= "" valign= "Bottom" >&nbsp;

</td>

</tr>

<tr>

<TD class= "jgtable" align= "center" height= "" valign= "Bottom" >&nbsp;

</td>

</tr>

<tr>

<TD class= "jgtable" align= "center" height= "" valign= "Bottom" >&nbsp;

</td>

</tr>

<tr>

<TD class= "jgtable" align= "center" height= "" valign= "Bottom" >&nbsp;

</td>

</tr>

</tbody></table>

CMDB Cabinet platform combined with Zabbix alarm display

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.