summaryrefslogtreecommitdiffstats
path: root/modules/statistics/config-templates/module_statistics.php
blob: 99d1de010b728227334c61d7e45fd8bff88fef6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<?php
/* 
 * The configuration of SimpleSAMLphp statistics package
 */

$config = array (

	// Authentication & authorization for statistics

	// Whether the statistics require authentication before use.
	'protected' => FALSE,

	/* The authentication source that should be used. */
	'auth' => 'admin',

	/* Alternative 1: List of allowed users. */
	//'useridattr' => 'eduPersonPrincipalName',
	//'allowedUsers' => array('andreas@uninett.no', 'ola.normann@sp.example.org'),

	/* Alternative 2: External ACL list. */
	//'acl' => 'adminlist',



	'default' => 'sso',

	'statdir' => '/tmp/stats/',
	'inputfile' => '/var/log/simplesamlphp.stat',
	'offset' => 60*60*2 + 60*60*24*3, // Two hours offset to match epoch and norwegian winter time.
	
	'datestart' => 1,
	'datelength' => 15,
	'offsetspan' => 21,
	
	// Dimensions on graph from Google Charts in pixels...
	'dimension.x' => 800,
	'dimension.y' => 350,
	
	/*
	 * Do you want to generate statistics using the cron module? If so, specify which cron tag to use.
	 * Examples: daily, weekly
	 * To not run statistics in cron, set value to 
	 *     'cron_tag' => NULL,
	 */
	'cron_tag' => 'daily',

	/*
	 * Set max running time for this script. This is also controlle by max_execution_time in php.ini
	 * and is defalut set to 30 sec. Your web server can have other timeout configurations that may
	 * also interrupt PHP execution. Apache has a Timeout directive and IIS has a
	 * CGI timeout function. Both default to 300 seconds.
	 */
	'time_limit' => 300,
	
	'timeres' => array(
		'day' => array(
			'name' => 'Day',
			'slot'		=> 60*15,			// Slots of 15 minutes
			'fileslot'	=> 60*60*24,		// One day (24 hours) file slots
			'axislabelint' => 6*4,			// Number of slots per label. 4 per hour *6 = 6 hours 
			'dateformat-period'	=> 'j. M', 			//  4. Mars
			'dateformat-intra'	=> 'j. M H:i', 		//  4. Mars 12:30	
		),
		'week' => array(
			'name' => 'Week',
			'slot'		=> 60*60,			// Slots of one hour
			'fileslot'	=> 60*60*24*7,		// 7 days of data in each file
			'axislabelint' => 24,			// Number of slots per label. 24 is one each day
			'dateformat-period'	=> 'j. M', 			//  4. Mars
			'dateformat-intra'	=> 'j. M H:i', 		//  4. Mars 12:30
		),
		'month' => array(
			'name' => 'Month',
			'slot'		=> 60*60*24,		// Slots of one day
			'fileslot'	=> 60*60*24*30,		// 30 days of data in each file
			'axislabelint' => 7,			// Number of slots per label. 7 days => 1 week
			'dateformat-period'	=> 'j. M Y H:i', 	//  4. Mars 12:30
			'dateformat-intra'	=> 'j. M', 			//  4. Mars
		),
		'monthaligned' => array(
			'name' => 'AlignedMonth',
			'slot'		=> 60*60*24,		// Slots of one day
			'fileslot'	=> NULL,		// 30 days of data in each file
			'customDateHandler' => 'month',
			'axislabelint' => 7,			// Number of slots per label. 7 days => 1 week
			'dateformat-period'	=> 'j. M Y H:i', 	//  4. Mars 12:30
			'dateformat-intra'	=> 'j. M', 			//  4. Mars
		),
		
		'days180' => array(
			'name' => '180 days',
			'slot'		=> 60*60*24,		// Slots of 1 day (24 hours)
			'fileslot'	=> 60*60*24*180,	// 80 days of data in each file
			'axislabelint' => 30,			// Number of slots per label. 7 days => 1 week
			'dateformat-period'	=> 'j. M', 		//  4. Mars
			'dateformat-intra'	=> 'j. M', 		//  4. Mars
		),
	),
	
	'time_limit' => 300,
	
	'timeres' => array(
		'day' => array(
			'name' => 'Day',
			'slot'		=> 60*15,			// Slots of 15 minutes
			'fileslot'	=> 60*60*24,		// One day (24 hours) file slots
			'axislabelint' => 6*4,			// Number of slots per label. 4 per hour *6 = 6 hours 
			'dateformat-period'	=> 'j. M', 			//  4. Mars
			'dateformat-intra'	=> 'j. M H:i', 		//  4. Mars 12:30	
		),
		'week' => array(
			'name' => 'Week',
			'slot'		=> 60*60,			// Slots of one hour
			'fileslot'	=> 60*60*24*7,		// 7 days of data in each file
			'axislabelint' => 24,			// Number of slots per label. 24 is one each day
			'dateformat-period'	=> 'j. M', 			//  4. Mars
			'dateformat-intra'	=> 'j. M H:i', 		//  4. Mars 12:30
		),
		'month' => array(
			'name' => 'Month',
			'slot'		=> 60*60*24,		// Slots of one day
			'fileslot'	=> 60*60*24*30,		// 30 days of data in each file
			'axislabelint' => 7,			// Number of slots per label. 7 days => 1 week
			'dateformat-period'	=> 'j. M Y H:i', 	//  4. Mars 12:30
			'dateformat-intra'	=> 'j. M', 			//  4. Mars
		),
		'monthaligned' => array(
			'name' => 'AlignedMonth',
			'slot'		=> 60*60*24,		// Slots of one day
			'fileslot'	=> NULL,		// 30 days of data in each file
			'customDateHandler' => 'month',
			'axislabelint' => 7,			// Number of slots per label. 7 days => 1 week
			'dateformat-period'	=> 'j. M Y H:i', 	//  4. Mars 12:30
			'dateformat-intra'	=> 'j. M', 			//  4. Mars
		),
		
		'days180' => array(
			'name' => '180 days',
			'slot'		=> 60*60*24,		// Slots of 1 day (24 hours)
			'fileslot'	=> 60*60*24*180,	// 80 days of data in each file
			'axislabelint' => 30,			// Number of slots per label. 7 days => 1 week
			'dateformat-period'	=> 'j. M', 		//  4. Mars
			'dateformat-intra'	=> 'j. M', 		//  4. Mars
		),
	),
	'statrules' => array(
		'sloratio' => array(
			'name' 		=> 'SLO to SSO ratio',
			'descr'		=> 'Comparison of the number of Single Log-Out compared to Single Sign-On. Graph shows how many logouts where initiated for each Single Sign-On.',
			'type' => 'calculated',
			'presenter' => 'statistics:Ratio',
			'ref' => array('slo', 'sso'),
			'fieldPresentation' => array(
				'class' => 'statistics:Entity',
				'config' => 'saml20-sp-remote',
			),
		),
		'ssomulti' => array(
			'name' 		=> 'Requests per session',
			'descr'		=> 'Number of SSO request pairs exchanged between IdP and SP within the same IdP session. A high number indicates that the session at the SP is timing out faster than at the IdP.',
			'type' => 'calculated',
			'presenter' => 'statistics:Ratio',
			'ref' => array('sso', 'ssofirst'),
			'fieldPresentation' => array(
				'class' => 'statistics:Entity',
				'config' => 'saml20-sp-remote',
			),
		),
		'sso' => array(
			'name' 		=> 'SSO to service',
			'descr'		=> 'The number of logins at a Service Provider.',
			'action' 	=> 'saml20-idp-SSO',
			'col'		=> 6,				// Service Provider EntityID
			'fieldPresentation' => array(
				'class' => 'statistics:Entity',
				'config' => 'saml20-sp-remote',
			),
		),
		'ssofirst' => array(
			'name' 		=> 'SSO-first to service',
			'descr'		=> 'The number of logins at a Service Provider.',
			'action' 	=> 'saml20-idp-SSO-first',
			'col'		=> 6,				// Service Provider EntityID
			'fieldPresentation' => array(
				'class' => 'statistics:Entity',
				'config' => 'saml20-sp-remote',
			),
		),
		'slo' => array(
			'name' 		=> 'SLO initiated from service',
			'descr'		=> 'The number of initated Sinlge Logout from each of the service providers.',
			'action' 	=> 'saml20-idp-SLO',
			'col'		=> 7,				// Service Provider EntityID that initiated the logout.
			'fieldPresentation' => array(
				'class' => 'statistics:Entity',
				'config' => 'saml20-sp-remote',
			),
		),
		'consent' => array(
			'name' 		=> 'Consent',
			'descr'		=> 'Consent statistics. Everytime a user logs in to a service an entry is logged for one of three states: consent was found, consent was not found or consent storage was not available.',
			'action' 	=> 'consent',
			'col'		=> 6,
			'fieldPresentation' => array(
				'class' => 'statistics:Entity',
				'config' => 'saml20-sp-remote',
			),
		),
		'consentresponse' => array(
			'name' 		=> 'Consent response',
			'descr'		=> 'Consent response statistics. Everytime a user accepts consent, it is logged whether the user selected to remember the consent to next time.',
			'action' 	=> 'consentResponse',
			'col'		=> 6,
			'fieldPresentation' => array(
				'class' => 'statistics:Entity',
				'config' => 'saml20-sp-remote',
			),
		),
		'slopages' => array(
			'name' 		=> 'SLO iframe pages',
			'descr'		=> 'The varioust IFrame SLO pages a user visits',
			'action' 	=> 'slo-iframe',
			'col'		=> 6,				// Page the user visits.
		),
		'slofail' => array(
			'name' 		=> 'Failed iframe IdP-init SLOs',
			'descr'		=> 'The number of logout failures from various SPs',
			'action' 	=> 'slo-iframe-fail',
			'col'		=> 6,				// Service Provider EntityID that wasn't logged out.
			'fieldPresentation' => array(
				'class' => 'statistics:Entity',
				'config' => 'saml20-sp-remote',
			),
		),
	),

);