Volkswagen Reviews Cat Access History

Source: Internet
Author: User
Tags log log relative
background

Because the company API interface from time to time by people attack, frequent collision, so a complete set of monitoring system to manage all the interfaces. Other people in the group are quickly iterating over an initial monitoring alarm system, and I'm free to take a look at the public reviews of the cat, just before colleagues their company's current use of the architecture used in the cat, greatly deepened the heart I want to study. Cat can find too few documents, may be the official website provided enough to use the document, but for the small white users, the official website of the document still need some actual code understanding, but after a few minutes to find out how the cat is very flexible, is a public review of the conscience. Construction, Documentation

Cat GitHub Address: Https://github.com/dianping/cat
Related documents: Building documents
Do not elaborate on how to build, here record everyone cat-home need to pay attention to the place Data/appdatas/cat directory is the relative address of the Cat-home configuration file, if window is relative to the project deployment of the disk data/applogs/ The Cat catalog is the log log that holds the Cat-home

Cat has a very important concept, that is, domain, a domain can be mapped into a project, such as Cat-home packaged into a war
is also a domain, cat-home default is the server is also the client, that is, cat-home itself will be monitored, this is
Why Cat-home/meta-inf/cat directory there will be Clinet.xml Cat-home is the cat server side is a support cluster, if there are multiple servers in the client.xml you have to configure multiple
Information on the service side

<config mode= "Client" >
    <servers>
       <server ip= "10.1.1.1" port= "2280" http-port= "8080"/>
       <server ip= "10.1.1.2" port= "2280" http-port= "8080"/>
       <server ip= "10.1.1.3" port= "2280" http-port= " 8080 "/>
    </servers>
</config>

-cat service side of the Server.xml, if it is a cluster remote-servers configuration of multiple, if used in HDFs configuration, it is necessary to note that local-mode= "false" if configured to True will not use the database

<config local-mode= "false" Hdfs-machine= "false" Job-machine= "false" Alert-machine= "false" >
    <storage  local-base-dir= "/data/appdatas/cat/bucket/" Max-hdfs-storage-time= "local-report-storage-time=" 7 " Local-logivew-storage-time= "7" >
        
Client-side routing modifications, both the cluster and the individual need to be modified to the IP

Client integration In fact the document has been said to be very detailed, the basic configuration can be. Use

If the client is already plugged in, such as the name Domain=mobileapi, first add the item, and then the project group assigns

The alarm interface needs to be implemented by ourselves.

-We can monitor the buried point, what is buried point, actually this

  Cat.logmetricforcount (Key)

We can monitor the buried points, such as how many times this method is executed in a certain time. Direct alarm
Alarm level and contact settings and alarm interface



Alarm interface Code We can rewrite the monitoring effect

client-side access code

Https://github.com/ggj2010/javabase/tree/master/mobiletechnology

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.