All Classes Files Functions Variables Enumerations Enumerator Groups Pages
Statistics.idl
Go to the documentation of this file.
1 /**
2  * @file Statistics.idl
3  * @brief %Server %Statistics, Traffic Charts
4  *
5  * @author Dusan Juhas
6  *
7  * @copyright Copyright © 2017 Kerio Technologies s.r.o.
8  */
9 
10 #import <kerio/web/idl/SharedStructures.idl>
11 #import <AdminStructures.idl> //Distance
12 #import <common.idl> //DateTimeStamp
13 
14 module kerio {
15 module jsonapi {
16 module admin {
17 
18 enum TypeExpStatistics {
19  expStatShort,
20  expStatFull
21 };
22 
24  kerio::web::ByteValueWithUnits total; ///< total space on disc
25  kerio::web::ByteValueWithUnits occupied; ///< occupied space on disc
26  string percentage; ///< how many per cent is occupied
27 };
28 
30  string count; ///< how many messages
31  kerio::web::ByteValueWithUnits volume; ///< how much space is occupied by messages
32  string recipients; ///< how many recipients in messages
33 };
34 
36  string transientFailures; ///< transient delivery failures
37  string permanentFailures; ///< permanent delivery failures
38 };
39 
40 struct Notifications {
41  string success; ///< how many sent success notifications
42  string delay; ///< how many sent delay notifications
43  string failure; ///< how many sent failure notifications
44 };
45 
47  string checkedAttachments; ///< how many checked attachments
48  string foundViruses; ///< how many found viruses
49  string prohibitedTypes; ///< how many found prohibited filenames/MIME types
50 };
51 
52 struct SpamStats {
53  string checked; ///< how many checked messages
54  string tagged; ///< how many tagged messages
55  string rejected; ///< how many rejected messages
56  string markedAsSpam; ///< how many messages were marked as spam by users
57  string markedAsNotSpam; ///< how many messages were marked as NOT spam by users
58 };
59 
60 struct OtherStats {
61  kerio::web::ByteValueWithUnits largest; ///< the largest messages received by server
62  string loops; ///< how many detected message loops
63 };
64 
66  string totalIncomingConnections;
67  string lostConnections;
68  string rejectedByBlacklist;
69  string authenticationAttempts;
70  string authenticationFailures;
71  string rejectedRelays;
72  string acceptedMessages;
73 };
74 
76  string connectionAttempts;
77  string dnsFailures;
78  string connectionFailures;
79  string connectionLosses;
80 };
81 
83  string totalIncomingConnections;
84  string authenticationFailures;
85  string sentMessages;
86 };
87 
89  string connectionAttempts;
90  string connectionFailures;
91  string authenticationFailures;
92  string totalDownloads;
93 };
94 
96  string totalIncomingConnections;
97  string authenticationFailures;
98 };
99 
101  string totalIncomingConnections;
102  string authenticationFailures;
103  string totalSearchRequests;
104 };
105 
107  string totalIncomingConnections;
108 };
109 
111  string totalIncomingConnections;
112  string authenticationFailures;
113 };
114 
116  string hostnameQueries;
117  string cachedHostnameQueries;
118  string mxQueries;
119  string cachedMxQueries;
120 };
121 
123  string rejectedConnections;
124  string rejectedMessages;
125  string rejectedHarvestAttacks;
126 };
127 
129 {
130  string messagesAccepted;
131  string messagesDelayed;
132  string messagesSkipped;
133 };
134 
136  DateTimeStamp start;
137  Distance uptime; ///< server uptime
138  OccupiedStorage storage;
139  MessageThroughput received; ///< messages received by server
140  MessageThroughput storedInQueue; ///< messages stored in queue
141  MessageThroughput transmitted; ///< messages transmitted by server
142  MessageThroughput deliveredToLocals; ///< messages delivered to local domains
143  MessageThroughput mx; ///< messages sent to remote MX servers
144  MessageThroughput relay; ///< messages sent to relay server
145  FailureAndBounce failures;
146  Notifications deliveryStatus;
147  AntivirusStats antivirus;
148  SpamStats spam;
149  OtherStats other;
150  SmtpServerStats smtpServer;
151  SmtpClientStats smtpClient;
152  Pop3ServerStats pop3Server;
153  Pop3ClientStats pop3Client;
154  ImapServerStats imapServer;
155  LdapServerStats ldapServer;
156  WebServerStats webServer;
157  XmppServerStats xmppServer;
158  DnsResolverStats dnsResolver;
159  AntibombingStats antibombing;
160  GreylistingStats greylisting;
161 };
162 
163 struct Scale {
164  long id;
165  long scaleTime; ///< The time scale
166  long sampleTime; ///< The sample scale
167 };
168 
169 typedef sequence<Scale> ScaleList;
170 
171 /**
172  * Descriptions of charts graph
173  */
174 struct Chart {
175  string classname; ///< A class name of chart
176  string name; ///< A chart name
177 
178  string xtype; ///< An x scale type
179  string ytype; ///< An y scale type
180 
181  long scaleCount; ///< A count of scales
182  ScaleList scale; ///< List of scales
183 };
184 
185 typedef sequence<Chart> ChartList;
186 
187 typedef sequence<long> ChartValueList;
188 typedef sequence<string> ChartRowNamesList;
189 typedef sequence<ChartValueList> ChartRowValuesList;
190 
191 /**
192  * Values of charts graph
193  */
194 struct ChartData {
195  string xName; ///< Name of X axis
196  ChartValueList xValues; ///< Values of X axis
197  long countValues; ///< A count of values in X axis
198 
199  long countRows; ///< A count of rows
200  ChartRowNamesList rowNames; ///< Array of names of rows
201  ChartRowValuesList rowValues; ///< Array of values of rows
202 };
203 
204 interface Statistics {
205 
206  /**
207  * Export server statistics to HTML format.
208  *
209  * @param fileDownload - description of output file
210  * @param type - export type
211  * @param lang - export language
212  */
213  void exportToHtml(out kerio::web::Download fileDownload, in TypeExpStatistics type, in string lang);
214 
215  /**
216  * Obtain overall server statistics.
217  *
218  * @param data - current statistics
219  */
220  void get(out ServerStatistics statistics);
221 
222  /**
223  * Obtain descriptions of charts graphs.
224  *
225  * @param chartList - list of descriptions of charts graphs
226  */
227  void getCharts(out ChartList chartList);
228 
229  /**
230  * Obtain values of charts graph.
231  *
232  * @param chartData - values of charts graph
233  * @param classname - classname of charts graph
234  * @param name - name of charts graph
235  * @param scaleId - ID of scale
236  */
237  void getChartData(out ChartData chartData, in string classname, in string name, in long scaleId);
238 
239  /**
240  * Reset statistics data.
241  */
242  void reset();
243 };
244 
245 }; }; };//end of namespace