117 | | |
118 | | |
119 | | |
120 | | |
121 | | |
122 | | |
123 | | |
| 117 | == Estadísticas de uso del servicio == |
| 118 | |
| 119 | Para mantener un registro básico de las estadísticas de uso del servicio Murachi se utiliza una base de datos Postgresql. |
| 120 | |
| 121 | En el servidor donde se ejecuta el servicio se debe crear una base de datos de Postgresql con el siguiente nombre {{{databasemurachi}}}. |
| 122 | |
| 123 | La estructura de la base de datos es la siguiente: |
| 124 | |
| 125 | {{{ |
| 126 | -- |
| 127 | -- PostgreSQL database dump |
| 128 | -- |
| 129 | |
| 130 | -- Dumped from database version 9.1.18 |
| 131 | -- Dumped by pg_dump version 9.1.18 |
| 132 | -- Started on 2015-09-16 14:47:26 VET |
| 133 | |
| 134 | SET statement_timeout = 0; |
| 135 | SET client_encoding = 'UTF8'; |
| 136 | SET standard_conforming_strings = on; |
| 137 | SET check_function_bodies = false; |
| 138 | SET client_min_messages = warning; |
| 139 | |
| 140 | -- |
| 141 | -- TOC entry 167 (class 3079 OID 11645) |
| 142 | -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: |
| 143 | -- |
| 144 | |
| 145 | CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; |
| 146 | |
| 147 | |
| 148 | -- |
| 149 | -- TOC entry 1886 (class 0 OID 0) |
| 150 | -- Dependencies: 167 |
| 151 | -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: |
| 152 | -- |
| 153 | |
| 154 | COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; |
| 155 | |
| 156 | |
| 157 | SET search_path = public, pg_catalog; |
| 158 | |
| 159 | SET default_tablespace = ''; |
| 160 | |
| 161 | SET default_with_oids = false; |
| 162 | |
| 163 | -- |
| 164 | -- TOC entry 162 (class 1259 OID 16920) |
| 165 | -- Dependencies: 5 |
| 166 | -- Name: signatures; Type: TABLE; Schema: public; Owner: aaraujo; Tablespace: |
| 167 | -- |
| 168 | |
| 169 | CREATE TABLE signatures ( |
| 170 | signature_id integer NOT NULL, |
| 171 | type character(4) NOT NULL |
| 172 | ); |
| 173 | |
| 174 | |
| 175 | ALTER TABLE public.signatures OWNER TO aaraujo; |
| 176 | |
| 177 | -- |
| 178 | -- TOC entry 166 (class 1259 OID 16936) |
| 179 | -- Dependencies: 5 |
| 180 | -- Name: signatures_error; Type: TABLE; Schema: public; Owner: aaraujo; Tablespace: |
| 181 | -- |
| 182 | |
| 183 | CREATE TABLE signatures_error ( |
| 184 | signature_error_id integer NOT NULL |
| 185 | ); |
| 186 | |
| 187 | |
| 188 | ALTER TABLE public.signatures_error OWNER TO aaraujo; |
| 189 | |
| 190 | -- |
| 191 | -- TOC entry 165 (class 1259 OID 16934) |
| 192 | -- Dependencies: 166 5 |
| 193 | -- Name: signatures_error_signature_error_id_seq; Type: SEQUENCE; Schema: public; Owner: aaraujo |
| 194 | -- |
| 195 | |
| 196 | CREATE SEQUENCE signatures_error_signature_error_id_seq |
| 197 | START WITH 1 |
| 198 | INCREMENT BY 1 |
| 199 | NO MINVALUE |
| 200 | NO MAXVALUE |
| 201 | CACHE 1; |
| 202 | |
| 203 | |
| 204 | ALTER TABLE public.signatures_error_signature_error_id_seq OWNER TO aaraujo; |
| 205 | |
| 206 | -- |
| 207 | -- TOC entry 1887 (class 0 OID 0) |
| 208 | -- Dependencies: 165 |
| 209 | -- Name: signatures_error_signature_error_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: aaraujo |
| 210 | -- |
| 211 | |
| 212 | ALTER SEQUENCE signatures_error_signature_error_id_seq OWNED BY signatures_error.signature_error_id; |
| 213 | |
| 214 | |
| 215 | -- |
| 216 | -- TOC entry 161 (class 1259 OID 16918) |
| 217 | -- Dependencies: 5 162 |
| 218 | -- Name: signatures_signature_id_seq; Type: SEQUENCE; Schema: public; Owner: aaraujo |
| 219 | -- |
| 220 | |
| 221 | CREATE SEQUENCE signatures_signature_id_seq |
| 222 | START WITH 1 |
| 223 | INCREMENT BY 1 |
| 224 | NO MINVALUE |
| 225 | NO MAXVALUE |
| 226 | CACHE 1; |
| 227 | |
| 228 | |
| 229 | ALTER TABLE public.signatures_signature_id_seq OWNER TO aaraujo; |
| 230 | |
| 231 | -- |
| 232 | -- TOC entry 1888 (class 0 OID 0) |
| 233 | -- Dependencies: 161 |
| 234 | -- Name: signatures_signature_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: aaraujo |
| 235 | -- |
| 236 | |
| 237 | ALTER SEQUENCE signatures_signature_id_seq OWNED BY signatures.signature_id; |
| 238 | |
| 239 | |
| 240 | -- |
| 241 | -- TOC entry 164 (class 1259 OID 16928) |
| 242 | -- Dependencies: 5 |
| 243 | -- Name: verifications; Type: TABLE; Schema: public; Owner: aaraujo; Tablespace: |
| 244 | -- |
| 245 | |
| 246 | CREATE TABLE verifications ( |
| 247 | verification_id integer NOT NULL |
| 248 | ); |
| 249 | |
| 250 | |
| 251 | ALTER TABLE public.verifications OWNER TO aaraujo; |
| 252 | |
| 253 | -- |
| 254 | -- TOC entry 163 (class 1259 OID 16926) |
| 255 | -- Dependencies: 164 5 |
| 256 | -- Name: verifications_verification_id_seq; Type: SEQUENCE; Schema: public; Owner: aaraujo |
| 257 | -- |
| 258 | |
| 259 | CREATE SEQUENCE verifications_verification_id_seq |
| 260 | START WITH 1 |
| 261 | INCREMENT BY 1 |
| 262 | NO MINVALUE |
| 263 | NO MAXVALUE |
| 264 | CACHE 1; |
| 265 | |
| 266 | |
| 267 | ALTER TABLE public.verifications_verification_id_seq OWNER TO aaraujo; |
| 268 | |
| 269 | -- |
| 270 | -- TOC entry 1889 (class 0 OID 0) |
| 271 | -- Dependencies: 163 |
| 272 | -- Name: verifications_verification_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: aaraujo |
| 273 | -- |
| 274 | |
| 275 | ALTER SEQUENCE verifications_verification_id_seq OWNED BY verifications.verification_id; |
| 276 | |
| 277 | |
| 278 | -- |
| 279 | -- TOC entry 1763 (class 2604 OID 16923) |
| 280 | -- Dependencies: 162 161 162 |
| 281 | -- Name: signature_id; Type: DEFAULT; Schema: public; Owner: aaraujo |
| 282 | -- |
| 283 | |
| 284 | ALTER TABLE ONLY signatures ALTER COLUMN signature_id SET DEFAULT nextval('signatures_signature_id_seq'::regclass); |
| 285 | |
| 286 | |
| 287 | -- |
| 288 | -- TOC entry 1765 (class 2604 OID 16939) |
| 289 | -- Dependencies: 165 166 166 |
| 290 | -- Name: signature_error_id; Type: DEFAULT; Schema: public; Owner: aaraujo |
| 291 | -- |
| 292 | |
| 293 | ALTER TABLE ONLY signatures_error ALTER COLUMN signature_error_id SET DEFAULT nextval('signatures_error_signature_error_id_seq'::regclass); |
| 294 | |
| 295 | |
| 296 | -- |
| 297 | -- TOC entry 1764 (class 2604 OID 16931) |
| 298 | -- Dependencies: 164 163 164 |
| 299 | -- Name: verification_id; Type: DEFAULT; Schema: public; Owner: aaraujo |
| 300 | -- |
| 301 | |
| 302 | ALTER TABLE ONLY verifications ALTER COLUMN verification_id SET DEFAULT nextval('verifications_verification_id_seq'::regclass); |
| 303 | |
| 304 | |
| 305 | -- |
| 306 | -- TOC entry 1874 (class 0 OID 16920) |
| 307 | -- Dependencies: 162 1879 |
| 308 | -- Data for Name: signatures; Type: TABLE DATA; Schema: public; Owner: aaraujo |
| 309 | -- |
| 310 | |
| 311 | COPY signatures (signature_id, type) FROM stdin; |
| 312 | \. |
| 313 | |
| 314 | |
| 315 | -- |
| 316 | -- TOC entry 1878 (class 0 OID 16936) |
| 317 | -- Dependencies: 166 1879 |
| 318 | -- Data for Name: signatures_error; Type: TABLE DATA; Schema: public; Owner: aaraujo |
| 319 | -- |
| 320 | |
| 321 | COPY signatures_error (signature_error_id) FROM stdin; |
| 322 | \. |
| 323 | |
| 324 | |
| 325 | -- |
| 326 | -- TOC entry 1890 (class 0 OID 0) |
| 327 | -- Dependencies: 165 |
| 328 | -- Name: signatures_error_signature_error_id_seq; Type: SEQUENCE SET; Schema: public; Owner: aaraujo |
| 329 | -- |
| 330 | |
| 331 | SELECT pg_catalog.setval('signatures_error_signature_error_id_seq', 1, false); |
| 332 | |
| 333 | |
| 334 | -- |
| 335 | -- TOC entry 1891 (class 0 OID 0) |
| 336 | -- Dependencies: 161 |
| 337 | -- Name: signatures_signature_id_seq; Type: SEQUENCE SET; Schema: public; Owner: aaraujo |
| 338 | -- |
| 339 | |
| 340 | SELECT pg_catalog.setval('signatures_signature_id_seq', 3, true); |
| 341 | |
| 342 | |
| 343 | -- |
| 344 | -- TOC entry 1876 (class 0 OID 16928) |
| 345 | -- Dependencies: 164 1879 |
| 346 | -- Data for Name: verifications; Type: TABLE DATA; Schema: public; Owner: aaraujo |
| 347 | -- |
| 348 | |
| 349 | COPY verifications (verification_id) FROM stdin; |
| 350 | \. |
| 351 | |
| 352 | |
| 353 | -- |
| 354 | -- TOC entry 1892 (class 0 OID 0) |
| 355 | -- Dependencies: 163 |
| 356 | -- Name: verifications_verification_id_seq; Type: SEQUENCE SET; Schema: public; Owner: aaraujo |
| 357 | -- |
| 358 | |
| 359 | SELECT pg_catalog.setval('verifications_verification_id_seq', 1, false); |
| 360 | |
| 361 | |
| 362 | -- |
| 363 | -- TOC entry 1771 (class 2606 OID 16941) |
| 364 | -- Dependencies: 166 166 1880 |
| 365 | -- Name: signatures_error_pkey; Type: CONSTRAINT; Schema: public; Owner: aaraujo; Tablespace: |
| 366 | -- |
| 367 | |
| 368 | ALTER TABLE ONLY signatures_error |
| 369 | ADD CONSTRAINT signatures_error_pkey PRIMARY KEY (signature_error_id); |
| 370 | |
| 371 | |
| 372 | -- |
| 373 | -- TOC entry 1767 (class 2606 OID 16925) |
| 374 | -- Dependencies: 162 162 1880 |
| 375 | -- Name: signatures_pkey; Type: CONSTRAINT; Schema: public; Owner: aaraujo; Tablespace: |
| 376 | -- |
| 377 | |
| 378 | ALTER TABLE ONLY signatures |
| 379 | ADD CONSTRAINT signatures_pkey PRIMARY KEY (signature_id); |
| 380 | |
| 381 | |
| 382 | -- |
| 383 | -- TOC entry 1769 (class 2606 OID 16933) |
| 384 | -- Dependencies: 164 164 1880 |
| 385 | -- Name: verifications_pkey; Type: CONSTRAINT; Schema: public; Owner: aaraujo; Tablespace: |
| 386 | -- |
| 387 | |
| 388 | ALTER TABLE ONLY verifications |
| 389 | ADD CONSTRAINT verifications_pkey PRIMARY KEY (verification_id); |
| 390 | |
| 391 | |
| 392 | -- |
| 393 | -- TOC entry 1885 (class 0 OID 0) |
| 394 | -- Dependencies: 5 |
| 395 | -- Name: public; Type: ACL; Schema: -; Owner: postgres |
| 396 | -- |
| 397 | |
| 398 | REVOKE ALL ON SCHEMA public FROM PUBLIC; |
| 399 | REVOKE ALL ON SCHEMA public FROM postgres; |
| 400 | GRANT ALL ON SCHEMA public TO postgres; |
| 401 | GRANT ALL ON SCHEMA public TO PUBLIC; |
| 402 | |
| 403 | |
| 404 | -- Completed on 2015-09-16 14:47:26 VET |
| 405 | |
| 406 | -- |
| 407 | -- PostgreSQL database dump complete |
| 408 | -- |
| 409 | |
| 410 | }}} |
| 411 | |
| 412 | En el servidor se debe cargar el script sql anterior en la base de datos creada previamente. |
| 413 | |
| 414 | Para obtener un JSON con las estadísticas básicas del servicio se utiliza el siguiente recurso: {{{https://murachi.cenditel.gob.ve/Murachi/0.1/archivos/estadisticas}}}. Por ejemplo: |
| 415 | |
| 416 | {{{ |
| 417 | {"numeroDeFimasIncompletas":"0","numeroDeVerificaciones":"0","numeroDeFirmasEjecutadas":"3"} |
| 418 | }}} |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | |
| 427 | |
| 428 | |