CN112866049A - Server host index acquisition method and system - Google Patents

Server host index acquisition method and system Download PDF

Info

Publication number
CN112866049A
CN112866049A CN201911189250.3A CN201911189250A CN112866049A CN 112866049 A CN112866049 A CN 112866049A CN 201911189250 A CN201911189250 A CN 201911189250A CN 112866049 A CN112866049 A CN 112866049A
Authority
CN
China
Prior art keywords
server host
index
configuration
file
configuration information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911189250.3A
Other languages
Chinese (zh)
Other versions
CN112866049B (en
Inventor
聂树明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongying Youchuang Information Technology Co Ltd
Original Assignee
Zhongying Youchuang Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhongying Youchuang Information Technology Co Ltd filed Critical Zhongying Youchuang Information Technology Co Ltd
Priority to CN201911189250.3A priority Critical patent/CN112866049B/en
Publication of CN112866049A publication Critical patent/CN112866049A/en
Application granted granted Critical
Publication of CN112866049B publication Critical patent/CN112866049B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/08Protocols specially adapted for terminal emulation, e.g. Telnet
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a server host index acquisition method and a system, wherein the method comprises the following steps: the server host receives the configuration file sent by the collector; the server host reads the configuration information in the configuration file, wherein the configuration information comprises: KPI index name, data type and template program name; the server host generates an index data file according to the configuration information in the configuration file; and the server host sends the index data file to the collector. The method and the system can collect the index of the server host, avoid the exposure of root authority and ensure the safety of the server host.

Description

Server host index acquisition method and system
Technical Field
The invention relates to the technical field of network management, in particular to a server host index acquisition method and system.
Background
In network management, a server host plays an important role, and the health level, configuration information, and the like thereof become particularly important. The operating systems of server hosts are currently mainly two systems: unix systems such as linux, SunOS, AIX, HP-UX and other operating systems, and Win systems mainly including Win operating system series.
In the prior art, a server host is remotely logged in a remote telnet or ssh mode usually, and the index of the server host is acquired in a command line mode, but the mode needs a root authority for remotely accessing the server host, and the potential safety hazard of the server host exists when the root authority is exposed.
Disclosure of Invention
The embodiment of the invention provides a server host index acquisition method, which is applied to a plurality of server hosts and used for acquiring server host indexes and ensuring the safety of the server hosts, and comprises the following steps:
the server host receives the configuration file sent by the collector;
the server host reads the configuration information in the configuration file, wherein the configuration information comprises: KPI index name, data type and template program name;
the server host generates an index data file according to the configuration information in the configuration file;
and the server host sends the index data file to the collector.
The embodiment of the invention provides a server host, which is used for acquiring the index of the server host and ensuring the safety of the server host, and comprises the following components:
the receiving module is used for receiving the configuration file sent by the acquisition machine;
a reading module, configured to read configuration information in the configuration file, where the configuration information includes: KPI index name, data type and template program name;
the generating module is used for generating an index data file according to the configuration information in the configuration file;
and the sending module is used for sending the index data file to a collector.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the server host index acquisition method when executing the computer program.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the server host index acquisition method when executing the computer program.
Compared with the scheme that a server host is remotely logged in a remote telnet or ssh mode in the prior art and the index of the server host is acquired in a command line mode, the configuration file sent by the acquisition machine is received by the server host in the embodiment of the invention; the server host reads the configuration information in the configuration file, wherein the configuration information comprises: KPI index name, data type and template program name; the server host generates an index data file according to the configuration information in the configuration file; and the server host sends the index data file to the collector. According to the embodiment of the invention, the root authority of the server host does not need to be remotely accessed, and the index data file can be generated only according to the configuration information in the configuration file, so that the root authority is prevented from being exposed, and the safety of the server host is ensured.
The embodiment of the invention provides a server host index acquisition method, which is used for acquiring server host indexes and ensuring the safety of a server host, and comprises the following steps:
the collector sends a configuration file to the server host;
the method comprises the following steps that an acquisition machine receives an index data file sent by a server host, the index data file is generated according to configuration information in the configuration file, and the configuration information comprises: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter;
and the acquisition machine stores the index data file into a database.
The embodiment of the invention provides a collector, which is used for collecting server host indexes and ensuring the safety of a host, and comprises:
the sending module is used for sending the configuration file to the server host;
a receiving module, configured to receive an index data file sent by a server host, where the index data file is generated according to configuration information in the configuration file, and the configuration information includes: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter;
and the storage module is used for storing the index data file into a database.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the server host index acquisition method when executing the computer program.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the server host index acquisition method when executing the computer program.
Compared with the scheme that a server host is remotely logged in a remote telnet or ssh mode and the index of the server host is acquired in a command line mode in the prior art, the configuration file is sent to the server host through the acquisition machine in the embodiment of the invention; the method comprises the following steps that an acquisition machine receives an index data file sent by a server host, the index data file is generated according to configuration information in the configuration file, and the configuration information comprises: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter; and the acquisition machine stores the index data file into a database. According to the embodiment of the invention, the root authority of the server host does not need to be remotely accessed, and the index data file can be generated only according to the configuration information in the configuration file, so that the root authority is prevented from being exposed, and the safety of the server host is ensured.
The embodiment of the invention provides a server host index acquisition system, which is used for acquiring server host indexes and ensuring the safety of a server host, and comprises the following components: the server host and the collector.
Compared with the scheme that the server host is remotely logged in a remote telnet or ssh mode and the server host index is acquired in a command line mode in the prior art, the method and the system for acquiring the index of the server host have the advantages that through the server host and the acquisition machine, the root authority of the server host does not need to be remotely accessed, the index data file can be generated only according to the configuration information in the configuration file, the root authority is prevented from being exposed, and the safety of the server host is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
FIG. 1 is a schematic diagram illustrating a method for collecting an index of a server host according to an embodiment of the present invention;
FIG. 2 is a diagram of a server host architecture in an embodiment of the present invention;
FIG. 3 is a diagram illustrating a method for collecting metrics of a server host according to an embodiment of the present invention;
FIG. 4 is a diagram of a structure of a harvester according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating an exemplary embodiment of a server host index acquisition system;
FIG. 6 is a flow chart of server host index collection in an embodiment of the present invention;
FIG. 7 is a flow chart of server host index collection in another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
In order to collect server host indexes and ensure server host safety, an embodiment of the present invention provides a server host index collection method, which is applied to a plurality of server hosts, and as shown in fig. 1, the method may include:
step 101, a server host receives a configuration file sent by an acquisition machine;
step 102, the server host reads configuration information in the configuration file, wherein the configuration information includes: KPI index name, data type and template program name;
103, generating an index data file by the server host according to the configuration information in the configuration file;
and 104, the server host sends the index data file to the collector.
As shown in fig. 1, in the embodiment of the present invention, a configuration file sent by an acquirer is received by a server host; the server host reads the configuration information in the configuration file, wherein the configuration information comprises: KPI index name, data type and template program name; the server host generates an index data file according to the configuration information in the configuration file; and the server host sends the index data file to the collector. According to the embodiment of the invention, the root authority of the server host does not need to be remotely accessed, and the index data file can be generated only according to the configuration information in the configuration file, so that the root authority is prevented from being exposed, and the safety of the server host is ensured.
In specific implementation, the server host receives the configuration file sent by the collector.
In specific implementation, the server host reads configuration information in the configuration file, where the configuration information includes: KPI index name, data type and template program name.
In the embodiment, each server host receives the configuration file sent by the corresponding acquisition machine, and one acquisition machine can manage a plurality of server hosts.
In an embodiment, the KPI indicator name is a unique identifier of the acquisition indicator, and the data type may comprise a distinguishing character type varchar or a number type.
In specific implementation, the server host generates an index data file according to the configuration information in the configuration file.
In an embodiment, the data types include: distinguishing character type varchar or number type;
the server host generates an index data file according to the configuration information in the configuration file, and the method comprises the following steps:
if the data type is a character-distinguishing varchar, the server host generates a configuration index data file according to the KPI index name and the template program name in the configuration file;
and if the data type is the digital number, the server host generates a performance index data file according to the KPI index name and the template program name in the configuration file.
In an embodiment, the generating, by the server host, an index data file according to the configuration information in the configuration file includes: the server host generates an index data file according to the configuration information in the configuration file and a local operating system tag, wherein the local operating system tag comprises: one of HPUX label, SOLARIS label, LINUX label, AIX label.
In this embodiment, all templates provide four versions according to the native os, which are respectively HPUX, SOLARIS, LINUX, and AIX, and the corresponding native os tags are: HPUX tag, SOLARIS tag, LINUX tag, and AIX tag. The templates of the four versions are respectively stored in the directories with HPUX, SOLARIS, LINUX and AIX as names, and the program is loaded by the main program according to the path when running.
In an embodiment, the configuration information further includes: acquisition parameters and acquisition intervals, wherein the acquisition parameters include: real parameter or cron parameter;
the server host generates an index data file according to the configuration information in the configuration file, and the method comprises the following steps:
if the acquisition parameters are real parameters, the server host generates an index data file according to the KPI index name, the data type and the template program name in the configuration file;
and if the acquisition parameters are cron parameters, the server host screens the KPI names in the configuration files according to the acquisition intervals, and generates an index data file according to the screened KPI names, the data types and the template program names.
In this embodiment, the unit of the acquisition interval is second, and the acquisition parameters include: reading the collection parameters, if reading the real parameters, then manually calling all indexes in the current collection configuration file, and generating an index data file by the server host according to the KPI index name, the data type and the template program name in the configuration file; if the cron parameter is read, calling for crontab, screening the KPI names in the configuration file according to the acquisition interval by the server host, and generating an index data file according to the screened KPI names, the data type and the template program name. For example, a preset value is set to be 60, if the current UNIX time acquisition interval is less than 60, the index is acquired this time, otherwise, the index is not acquired this time, and therefore, the screening of the KPI index names in the configuration file can be realized.
In an embodiment, the configuration information further includes: template parameters;
the server host generates an index data file according to the configuration information in the configuration file, and the method comprises the following steps: and the server host generates an index data file and an instantiation file according to the configuration information in the configuration file.
In this embodiment, if instantiation is required, specification needs to be performed in the template parameters, and a plurality of instances are separated by commas.
In an embodiment, the configuration information further includes: a pointer name is stored, which is used to name the pointer name after the pointer data file is generated.
In an embodiment, the breakpoint file is read, and if there is no breakpoint file (i.e. representing the first execution) and the acquisition parameter is the cron parameter, all indexes in the configuration file are acquired.
As an example, the server host loads the configuration file into memory, for example:
$para{‘HOS_UNIX_CPU.pl’}{‘UB_CPUIdleTime’}{‘Valid’}=1;
$para{‘HOS_UNIX_CPU.pl’}{‘UB_CPUIdleTime’}{‘Type’}=’number’;
$para{‘HOS_UNIX_CPU.pl’}{‘UB_CPUSysTime’}{‘Valid’}=1;
$para{‘HOS_UNIX_CPU.pl’}{‘UB_CPUSysTime’}{‘Type’}=’number’;
$para{‘HOS_UNIX_NETWORK.pl’}{‘UB_NETPacketsIO’}{‘Valid’}=1;
$para{‘HOS_UNIX_NETWORK.pl’}{‘UB_NETPacketsIO’}{‘Type’}=’number’;
$para{‘HOS_UNIX_NETWORK.pl’}{‘UB_NETPacketsIO’}{‘Filter’}=’eth1’;
cycling each key value of% para, loading a template program according to a label of a native operating system, such as require ("HPUX/HOS _ UNIX _ network.pl"), and executing a template function with a parameter of $ para { $ key }, such as $ subpar { 'UB _ NETPacketsIO' } { 'Valid' } 1; storing result data into a file, storing indexes of a 'varchar' type into the cfg _ host address, acquiring time, storing indexes of a 'number' type into the perf _ host address, and acquiring time; the file format is determined according to the network management performance acquisition file, and the host number is replaced by an address; and saving the time to breakpoint file.
In an embodiment, the template programs are clustered according to the index function, such as: HOS _ UNIX _ info.pl (configuration data collection template, collection of 17 indices of CM class), HOS _ UNIX _ cpu.pl (CPU index collection template, collection of 7 indices related to CPU), HOS _ UNIX _ mem.pl (memory index collection template, collection of 4 indices related to memory), HOS _ UNIX _ disk.pl (disk index collection template, collection of 5 indices related to disk), HOS _ UNIX _ fs.pl (file system index collection template, collection of 3 indices related to file system), HOS _ x _ procs.pl (process information index collection template, collection of 3 indices related to process), HOS _ UNIX _ network.pl (network operation data index collection template, collection of 5 indices related to network), HOS _ UNIX _ client.pl (Cluster index collection template, collection of 1 index related to Cluster).
As an example, the acquisition parameters are read, and each key value is cycled: if $ para { $ key } { 'Valid' } is 1, acquiring the index, otherwise, filtering; intercepting the acquisition result, and if the $ para { $ key } { 'Filter' } is not null, filtering according to the value of the $ para { $ key } { 'Filter' } and the value can be a plurality of instances; if the acquisition result is of value type: $ para { $ key } { ' result ' } { -1} - } ═ result value '; if the table type: $ para { $ key } { 'result' } { 'para 1' } { 'result value 1', $ para { $ key } { 'result' } { 'para 2' } { 'result value 2'; and when a certain command in the template fails to be executed, the execution of other commands is not influenced.
In specific implementation, the server host sends the index data file to the collector.
In the embodiment, the acquisition result is uploaded through ftp, the uploading host and the uploading directory are read from the configuration file through regular calling or manual calling, the file in the local acquisition result directory is uploaded through the ftp, and if the uploading is successful, the local file is deleted, otherwise, the local file is saved; and uploading all files in the collection result directory in each operation.
It should be noted that the method provided by the embodiment of the present invention has the following advantages: the server host can manage different collectors in a distributed mode, the server host reports to the corresponding collectors regularly and actively after collection is completed, the collectors are stored in a centralized mode, and data are managed uniformly by the database. The collection indexes can be flexibly defined, and the collection indexes, the collection intervals, the collection instance parameters and the like can be flexibly customized. And (4) performing template collection on indexes, and directly adjusting corresponding templates if collection logic changes. The system supports various host systems, UNIX supports linux, Sunos, AIX, HP-UX, WIN supports full WIN host systems.
Based on the same inventive concept, the embodiment of the present invention further provides a server host, as described in the following embodiments. Because the principles of solving the problems are similar to the index acquisition method of the server host, the implementation of the server host can refer to the implementation of the method, and repeated details are not repeated.
Fig. 2 is a structural diagram of a server host according to an embodiment of the present invention, and as shown in fig. 2, the server host 200 includes:
a receiving module 201, configured to receive a configuration file sent by an acquirer;
a reading module 202, configured to read configuration information in the configuration file, where the configuration information includes: KPI index name, data type and template program name;
a generating module 203, configured to generate an index data file according to the configuration information in the configuration file;
and the sending module 204 is configured to send the index data file to the collector.
In one embodiment, the data types include: distinguishing character type varchar or number type;
the generating module 203 is further configured to:
if the data type is a character-distinguishing varchar, the server host generates a configuration index data file according to the KPI index name and the template program name in the configuration file;
and if the data type is the digital number, the server host generates a performance index data file according to the KPI index name and the template program name in the configuration file.
In one embodiment, the generating module 203 is further configured to: the server host generates an index data file according to the configuration information in the configuration file and a local operating system tag, wherein the local operating system tag comprises: one of HPUX label, SOLARIS label, LINUX label, AIX label.
In one embodiment, the configuration information further includes: acquisition parameters and acquisition intervals, wherein the acquisition parameters include: real parameter or cron parameter;
the generating module 203 is further configured to:
if the acquisition parameters are real parameters, the server host generates an index data file according to the KPI index name, the data type and the template program name in the configuration file;
and if the acquisition parameters are cron parameters, the server host screens the KPI names in the configuration files according to the acquisition intervals, and generates an index data file according to the screened KPI names, the data types and the template program names.
In one embodiment, the configuration information further includes: template parameters;
the generating module 203 is further configured to: and the server host generates an index data file and an instantiation file according to the configuration information in the configuration file.
In summary, in the embodiments of the present invention, the server host receives the configuration file sent by the collector; the server host reads the configuration information in the configuration file, wherein the configuration information comprises: KPI index name, data type and template program name; the server host generates an index data file according to the configuration information in the configuration file; and the server host sends the index data file to the collector. According to the embodiment of the invention, the root authority of the server host does not need to be remotely accessed, and the index data file can be generated only according to the configuration information in the configuration file, so that the root authority is prevented from being exposed, and the safety of the server host is ensured.
Based on the same inventive concept, the embodiment of the invention also provides a server host index acquisition method, as described in the following embodiments. Because the principles of solving the problems are similar to the server host index acquisition method, repeated parts are not described again. In order to collect the index of the server host and ensure the security of the server host, an embodiment of the present invention provides a method for collecting the index of the server host, where as shown in fig. 3, the method may include:
301, the collector sends a configuration file to the server host;
step 302, the collector receives an index data file sent by a server host, where the index data file is generated according to configuration information in the configuration file, and the configuration information includes: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter;
and step 303, the acquisition machine stores the index data file into a database.
As shown in fig. 3, in the embodiment of the present invention, the configuration file is sent to the server host through the collector; the method comprises the following steps that an acquisition machine receives an index data file sent by a server host, the index data file is generated according to configuration information in the configuration file, and the configuration information comprises: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter; and the acquisition machine stores the index data file into a database. According to the embodiment of the invention, the root authority of the server host does not need to be remotely accessed, and the index data file can be generated only according to the configuration information in the configuration file, so that the root authority is prevented from being exposed, and the safety of the server host is ensured.
In the embodiment, the acquisition machine periodically tests the ping connectivity state of the server host, and the test result corresponds to a UB _ HOS _ UValid acquisition index.
In the embodiment, the acquisition machine writes the index data file acquired and uploaded by the server host into the database; calling at regular time by the crontab and operating the collector.
Based on the same inventive concept, the embodiment of the invention also provides a collecting machine, as described in the following embodiments. Because the principles for solving the problems are similar to the server host index acquisition method, the implementation of the acquisition machine can refer to the implementation of the method, and repeated details are not repeated.
Fig. 4 is a structural diagram of an acquisition machine in an embodiment of the present invention, and as shown in fig. 4, the acquisition machine 400 includes:
a sending module 401, configured to send a configuration file to a server host;
a receiving module 402, configured to receive an index data file sent by a server host, where the index data file is generated according to configuration information in the configuration file, where the configuration information includes: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter;
a storage module 403, configured to store the index data file in a database.
In summary, in the embodiments of the present invention, the configuration file is sent to the server host through the collector; the method comprises the following steps that an acquisition machine receives an index data file sent by a server host, the index data file is generated according to configuration information in the configuration file, and the configuration information comprises: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter; and the acquisition machine stores the index data file into a database. According to the embodiment of the invention, the root authority of the server host does not need to be remotely accessed, and the index data file can be generated only according to the configuration information in the configuration file, so that the root authority is prevented from being exposed, and the safety of the server host is ensured.
In order to collect the index of the server host and ensure the security of the server host, an embodiment of the present invention provides a server host index collection system, as shown in fig. 5, the system may include: the server host 200 and the harvester 400.
As can be seen from fig. 5, in the embodiment of the present invention, through the server host and the collection machine, a root authority of the server host does not need to be remotely accessed, and an index data file can be generated only according to configuration information in a configuration file, so that the root authority is prevented from being exposed, and the security of the server host is ensured.
Two specific embodiments are given below to illustrate specific applications and process deployment descriptions of the server host index acquisition method in the embodiment of the present invention.
The first embodiment is described for a UNIX server host, and the collection flow chart is shown in fig. 6. The program deployment locations are as follows:
(1) a collecting machine:
and (3) host data entering program: $ SetupDir/bin/AgentData2DB. pl
Unix host state collection program: pls SetupDir/bin/HostPerfUnix _ agent
(2) Unix host: (all programs need to be run with root authority, so that the programs are deployed in the corresponding subdirectories of the root directory)
The Unix host collects the main programs: pl/nms/bin/uxDataCol
The Unix host collects the index configuration file: ini/nms/cfg/agent _ ux.
4 kinds of template programs of the operating system:
/nms/lib/HPUX/*
/nms/lib/SOLARIS/*
/nms/lib/LINUX/*
/nms/lib/AIX/*
and (3) uploading a collection result: sh/nms/sh/Collileplug
The common calling program:
/nms/lib/Debug.pl
/nms/lib/CommonPub.pl
the procedure deployment procedure is illustrated as follows:
(1) put the program in the corresponding position
(2) Configuring indexes needing to be collected in agent _ ux.ini:
1. the indexes which are not collected can be annotated by adding a # symbol in front
2. Configuration (CM) index data type versus varchar, Performance (PM) index data type versus number
3. The index to be instantiated is configured according to the actual situation of the host, for example, CM-00-01-01-01-11 (system network interface IP address), the name of the network interface in the host can be inquired by a system command ifconfig-a, the index is configured in the last column of the row, and a plurality of network interfaces are separated by English commas. The list of metrics that need to be instantiated is as follows:
Figure BDA0002293148980000101
Figure BDA0002293148980000111
(3) in cron agent on unix host: (configuring collector ip, starting cron with root account)
And uploading a collection result, calling once in 10 minutes, and configuring the 'collector ip' according to actual conditions
0,10,20,30,40,50 × $ HOME/nms/sh/ColFileUpload
Main program was collected on # Unix host and called once in 5 minutes
0,5,10,15,20,25,30,35,40,45,50,55****$HOME/nms/bin/UxDataCol.pl cron
(4) Xml configuration on the harvester:
setuppir, AgentDataDir (Agent data file upload directory), pinttioutpe, DBType, PRSNODE (management node range corresponding to the harvester) (where PRSNODE needs to be configured according to the actual management node on the harvester)
Figure BDA0002293148980000112
Figure BDA0002293148980000121
(5) Static was collected at nmscons ps:
# configuration Performance data collected by the host computer into storage, once every 10 minutes
0,10,20,30,40,50****$HOME/nms/bin/AgentData2DB.pl
The procedure call relationship is illustrated as follows:
(1) and UxDataCol.pl reads agent _ ux.ini to obtain index information, automatically selects a corresponding template directory according to the current host operating system, calls each template, collects indexes matched in agent _ ux.ini, and stores a generated file in the/nms/data/import/hostperf/directory.
Pl has only one, real or cron parameter
real: the method comprises the steps of manually calling, and collecting all indexes in a configuration file at this time;
cron: the method is used for calling the crontab, and the current acquisition index is filtered according to an acquisition interval field in the configuration file agent _ ux.
(2) Uploading the file generated in the last step to an acquisition machine through ColFileUpload.
(3) And warehousing the files uploaded by the unix host and the WINDOWS server host once every ten minutes by AgentData2DB.pl on the acquisition machine.
(4) Ping test is carried out on the unix host in HostPerfUnix _ agent.pl on the acquisition machine, the state of the unix host is stored, and the generated file is put in a warehouse by another program PerfToDB.pl (not the program developed this time).
The Unix host index collection principle is as follows:
and collecting through a system command in a Unix operating system. Different operating systems have certain difference in system commands and certain difference in presentation format of results, the templates are distinguished according to the operating systems, the results are analyzed, and the index information is obtained.
The second specific embodiment is described with respect to WINDOWS server host, and the acquisition flowchart is shown in fig. 7. The program deployment locations are as follows:
and respectively deploying the acquisition program to the acquisition machine and the server host. Deploying a configuration acquisition program on the acquisition machine: DevUHostWin agent. pl and performance acquisition program: pl; deploying a configuration acquisition program on the server host: pl.
Starting an acquisition program through a planned task, acquiring 3 configuration indexes on a server host by using WinDataCol.pl, and uploading an acquisition result to an acquisition machine; and respectively collecting configuration indexes and performance indexes on a collector by using a DevUHostWin _ agent.pl and a HostPerfWin _ agent.pl, and storing the collection results into files.
And inserting the file uploaded by the server host and the data file generated by the acquisition machine into a database. This completes an acquisition cycle.
The procedure and specific configuration of the program deployment are described as follows:
WINDOWS self-collection program only supports system environment above NT
Background configuration file (branch collector and control machine description)
shconfig.xml configuration description
A collecting machine:
configuring parameters: setuppir, DBType, AgentDataDir (Agent data file upload directory) server host:
configuring parameters: SetupDir, DBType, FTPUSeName, FTPPasswd, UploadHost, uploadDir
The UploadHost is the address of the collector; the directory pointed to by the UpLoadDir and AgentDataDir should be the same
The concrete configuration is as follows:
WINDOWS Server host:
setuppir: taking the context variable's windir, right-key my computer- > attribute- > high-level- > context variable- > system variable- > windir
Figure BDA0002293148980000131
Figure BDA0002293148980000141
A collecting machine:
SetupDir, AgentDataDir (Agent data File upload directory), DBType, needs to be configured
Figure BDA0002293148980000142
Acquiring an item needing to be instantiated by an index configuration file agent _ win.
Figure BDA0002293148980000151
A collecting machine:
/slview/nms/cfg/agent_win.ini
a server host:
Windir/cfg/agent_win.ini
context variables and timing calls
Calling a program: callhostperfagent.sh, callhostpagent.sh deposit directory: $ HOME/nms/sh-
And selecting the called program according to different environments, and annotating the called program when the called program is not used, wherein the default is WINDOWS self-collection.
The SetupDir is the environment variable's window, right bond my computer- > attribute- > high-level- > environment variable- > system variable- > window
CRON entry (static, branch collector and control machine description)
A collecting machine: static of nmscoron ps
(01) × $ HOME/nms/sh/CallHostAgent.sh # calling configuration collection at 1 point per day
And (2) fixed-time calling performance acquisition of (02) × $ HOME/nms/sh/CallHostPerfAgent
A server host:
WINDOWS Server host:
setuppir: taking the context variable's windir, right-key my computer- > attribute- > high-level- > context variable- > system variable- > windir
At.cmd:
7 o' clock at 7:00am/every:1wind \ bin \ WinDataCol.pl # 1/month
windows does not support $ setuppir, so the path is fixed: pI of Windir \ bin \ WinDataCol. If program deployed $ SetupDir is not widdir, please modify this program path on its own
The procedure call relationship is illustrated as follows:
a server host:
ini deposit path of configuration file agent _ win: $ SetupDir/cfg/agent _ win
Pl storage path of the template file HOS _ WIN _ CMD: $ SetupDir/lib/WIN
Pl storage path of main program file WinDataCol: $ SetupDir/bin-
A collecting machine:
$SetupDir=/slview/nms/
ini deposit path of configuration file agent _ win: $ SetupDir/cfg/agent _ win
Template file HOS _ WIN _. pl storage path: $ SetupDir/lib/WIN
Main program files HostPerfWin _ agent.pl, DevUHostWin _ agent.pl storage path: $ SetupDir/bin-
The WINDOWDS host index acquisition principle is as follows:
and acquiring indexes of the Win host by the server host in an instruction mode to generate a file, uploading the file to an acquisition machine, putting the file in storage by the acquisition machine, acquiring index data of the server host by the acquisition machine in a snmp mode, and generating the file on the acquisition machine to put the file in storage.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (15)

1. A server host index acquisition method is applied to a plurality of server hosts and is characterized by comprising the following steps:
the server host receives the configuration file sent by the collector;
the server host reads the configuration information in the configuration file, wherein the configuration information comprises: KPI index name, data type and template program name;
the server host generates an index data file according to the configuration information in the configuration file;
and the server host sends the index data file to the collector.
2. The server host metric collection method of claim 1, wherein the data types comprise: distinguishing character type varchar or number type;
the server host generates an index data file according to the configuration information in the configuration file, and the method comprises the following steps:
if the data type is a character-distinguishing varchar, the server host generates a configuration index data file according to the KPI index name and the template program name in the configuration file;
and if the data type is the digital number, the server host generates a performance index data file according to the KPI index name and the template program name in the configuration file.
3. The server host index collection method of claim 1, wherein the server host generates an index data file according to the configuration information in the configuration file, comprising: the server host generates an index data file according to the configuration information in the configuration file and a local operating system tag, wherein the local operating system tag comprises: one of HPUX label, SOLARIS label, LINUX label, AIX label.
4. The server host metric collection method of claim 1, wherein the configuration information further comprises: acquisition parameters and acquisition intervals, wherein the acquisition parameters include: real parameter or cron parameter;
the server host generates an index data file according to the configuration information in the configuration file, and the method comprises the following steps:
if the acquisition parameters are real parameters, the server host generates an index data file according to the KPI index name, the data type and the template program name in the configuration file;
and if the acquisition parameters are cron parameters, the server host screens the KPI names in the configuration files according to the acquisition intervals, and generates an index data file according to the screened KPI names, the data types and the template program names.
5. The server host metric collection method of claim 1, wherein the configuration information further comprises: template parameters;
the server host generates an index data file according to the configuration information in the configuration file, and the method comprises the following steps: and the server host generates an index data file and an instantiation file according to the configuration information in the configuration file.
6. A server host index acquisition method is characterized by comprising the following steps:
the collector sends a configuration file to the server host;
the method comprises the following steps that an acquisition machine receives an index data file sent by a server host, the index data file is generated according to configuration information in the configuration file, and the configuration information comprises: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter;
and the acquisition machine stores the index data file into a database.
7. A server host, comprising:
the receiving module is used for receiving the configuration file sent by the acquisition machine;
a reading module, configured to read configuration information in the configuration file, where the configuration information includes: KPI index name, data type and template program name;
the generating module is used for generating an index data file according to the configuration information in the configuration file;
and the sending module is used for sending the index data file to a collector.
8. The server host of claim 7, wherein the data types comprise: distinguishing character type varchar or number type;
the generation module is further to:
if the data type is a character-distinguishing varchar, the server host generates a configuration index data file according to the KPI index name and the template program name in the configuration file;
and if the data type is the digital number, the server host generates a performance index data file according to the KPI index name and the template program name in the configuration file.
9. The server host of claim 7, wherein the generation module is further to: the server host generates an index data file according to the configuration information in the configuration file and a local operating system tag, wherein the local operating system tag comprises: one of HPUX label, SOLARIS label, LINUX label, AIX label.
10. The server host of claim 7, wherein the configuration information further comprises: acquisition parameters and acquisition intervals, wherein the acquisition parameters include: real parameter or cron parameter;
the generation module is further to:
if the acquisition parameters are real parameters, the server host generates an index data file according to the KPI index name, the data type and the template program name in the configuration file;
and if the acquisition parameters are cron parameters, the server host screens the KPI names in the configuration files according to the acquisition intervals, and generates an index data file according to the screened KPI names, the data types and the template program names.
11. The server host of claim 7, wherein the configuration information further comprises: template parameters;
the generation module is further to: and the server host generates an index data file and an instantiation file according to the configuration information in the configuration file.
12. An harvester, comprising:
the sending module is used for sending the configuration file to the server host;
a receiving module, configured to receive an index data file sent by a server host, where the index data file is generated according to configuration information in the configuration file, and the configuration information includes: KPI index name, data type, acquisition interval, storage index name, template program name and template parameter;
and the storage module is used for storing the index data file into a database.
13. A server host index collection system, comprising: a server host and a harvester, wherein the server host comprises the server host of any one of claims 7-11 and the harvester comprises the harvester of claim 12.
14. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 6 when executing the computer program.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 6.
CN201911189250.3A 2019-11-28 2019-11-28 Method and system for collecting index of server host Active CN112866049B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911189250.3A CN112866049B (en) 2019-11-28 2019-11-28 Method and system for collecting index of server host

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911189250.3A CN112866049B (en) 2019-11-28 2019-11-28 Method and system for collecting index of server host

Publications (2)

Publication Number Publication Date
CN112866049A true CN112866049A (en) 2021-05-28
CN112866049B CN112866049B (en) 2023-05-30

Family

ID=75985932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911189250.3A Active CN112866049B (en) 2019-11-28 2019-11-28 Method and system for collecting index of server host

Country Status (1)

Country Link
CN (1) CN112866049B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872800A (en) * 2021-09-03 2021-12-31 中盈优创资讯科技有限公司 Method and device for realizing cloud access of acquisition and control access network plug-in
CN115766459A (en) * 2022-11-03 2023-03-07 中盈优创资讯科技有限公司 Method and device for collecting and controlling IPRAN (internet protocol radio Access network)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050045726A1 (en) * 2003-08-28 2005-03-03 Terlizzi Jeffrey J. Multi-interface data acquisition system and method thereof
CN102480749A (en) * 2010-11-25 2012-05-30 中国移动通信集团浙江有限公司 Method, device and system for remotely collecting host process information
CN103870297A (en) * 2012-12-14 2014-06-18 北京华胜天成科技股份有限公司 Performance data collection system and method of virtual machine in cloud computing environment
CN104462616A (en) * 2013-09-18 2015-03-25 上海宝信软件股份有限公司 Dynamic data collection method based on configuration item
CN105204922A (en) * 2014-06-30 2015-12-30 金电联行(北京)信息技术有限公司 Collecting method of client terminal of data collecting platform
CN107302450A (en) * 2017-06-13 2017-10-27 国网冀北电力有限公司信息通信分公司 A kind of data acquisition session variation and device
CN110347569A (en) * 2019-06-28 2019-10-18 浙江吉利控股集团有限公司 A kind of performance data of server acquisition method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050045726A1 (en) * 2003-08-28 2005-03-03 Terlizzi Jeffrey J. Multi-interface data acquisition system and method thereof
CN102480749A (en) * 2010-11-25 2012-05-30 中国移动通信集团浙江有限公司 Method, device and system for remotely collecting host process information
CN103870297A (en) * 2012-12-14 2014-06-18 北京华胜天成科技股份有限公司 Performance data collection system and method of virtual machine in cloud computing environment
CN104462616A (en) * 2013-09-18 2015-03-25 上海宝信软件股份有限公司 Dynamic data collection method based on configuration item
CN105204922A (en) * 2014-06-30 2015-12-30 金电联行(北京)信息技术有限公司 Collecting method of client terminal of data collecting platform
CN107302450A (en) * 2017-06-13 2017-10-27 国网冀北电力有限公司信息通信分公司 A kind of data acquisition session variation and device
CN110347569A (en) * 2019-06-28 2019-10-18 浙江吉利控股集团有限公司 A kind of performance data of server acquisition method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113872800A (en) * 2021-09-03 2021-12-31 中盈优创资讯科技有限公司 Method and device for realizing cloud access of acquisition and control access network plug-in
CN115766459A (en) * 2022-11-03 2023-03-07 中盈优创资讯科技有限公司 Method and device for collecting and controlling IPRAN (internet protocol radio Access network)

Also Published As

Publication number Publication date
CN112866049B (en) 2023-05-30

Similar Documents

Publication Publication Date Title
US10956213B1 (en) Automated workflow creation and management
CN109947746B (en) Data quality control method and system based on ETL flow
US10430204B2 (en) System and method for cloud provisioning and application deployment
US6167358A (en) System and method for remotely monitoring a plurality of computer-based systems
US8839107B2 (en) Context based script generation
US20160019041A1 (en) System and method for deploying software into a computing environment
US7870169B2 (en) Method for enabling traceability and recovery from errors during migration of software applications
US9323789B1 (en) Automated application protection and reuse using a workflow component
CN112866049A (en) Server host index acquisition method and system
KR101985635B1 (en) Method and system for creating template scripts based container orchestrator
JP6615071B2 (en) Computer system and test case management method
CN113448793B (en) System monitoring method and device compatible with multiple operating systems
CN116627751A (en) Service log acquisition method and device and electronic equipment
CN112685370B (en) Log collection method, device, equipment and medium
CN114706738A (en) Method and device for automatically burying point at client
Cisco Managing Cisco Device Configurations
Cisco Managing Cisco Device Configurations
Cisco Managing Cisco Device Configurations
Cisco Managing Cisco Device Configurations
US9645851B1 (en) Automated application protection and reuse using an affinity module
CN113220592A (en) Processing method and device for automated testing resources, server and storage medium
CN110990181A (en) Method and system for automatically reproducing probabilistic setting failure of options in BIOS (basic input/output System)
US7606878B2 (en) Method and system for capturing and automating execution of administrative processes in a machine-readable format
CN112579189A (en) Configuration file updating method and device
US20050108727A1 (en) Application binding in a network environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant