1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package goldengate.ftp.exec.snmp;
21
22 import org.snmp4j.agent.DuplicateRegistrationException;
23 import org.snmp4j.agent.MOScope;
24 import org.snmp4j.agent.MOServer;
25 import org.snmp4j.agent.mo.MOAccessImpl;
26 import org.snmp4j.agent.mo.snmp.SNMPv2MIB;
27 import org.snmp4j.agent.mo.snmp.SysUpTime;
28 import org.snmp4j.mp.SnmpConstants;
29 import org.snmp4j.smi.Integer32;
30 import org.snmp4j.smi.OID;
31 import org.snmp4j.smi.OctetString;
32 import org.snmp4j.smi.SMIConstants;
33 import org.snmp4j.smi.TimeTicks;
34 import org.snmp4j.smi.VariableBinding;
35
36 import goldengate.common.command.ReplyCode;
37 import goldengate.common.logging.GgInternalLogger;
38 import goldengate.common.logging.GgInternalLoggerFactory;
39 import goldengate.ftp.exec.config.FileBasedConfiguration;
40 import goldengate.ftp.exec.database.data.DbTransferLog;
41 import goldengate.ftp.exec.utils.Version;
42 import goldengate.snmp.GgSnmpAgent;
43 import goldengate.snmp.interf.GgInterfaceMib;
44 import goldengate.snmp.utils.GgEntry;
45 import goldengate.snmp.utils.GgMORow;
46 import goldengate.snmp.utils.GgMOScalar;
47 import goldengate.snmp.utils.GgUptime;
48 import goldengate.snmp.utils.MemoryGauge32;
49 import goldengate.snmp.utils.MemoryGauge32.MemoryType;
50
51
52
53
54
55
56
57 public class FtpPrivateMib implements GgInterfaceMib {
58
59
60
61 private static GgInternalLogger logger = GgInternalLoggerFactory
62 .getLogger(FtpPrivateMib.class);
63
64 public static final String SnmpName = "GoldenGate FTP Exec SNMP";
65
66 public static final int SnmpPrivateId = 66666;
67
68 public static final int SnmpFtpId = 21;
69
70 public static final String SnmpDefaultAuthor = "Frederic Bregier";
71
72 public static final String SnmpVersion = "GoldenGate Ftp Exec " +
73 Version.ID;
74
75 public static final String SnmpDefaultLocalization = "Paris, France";
76
77 public static final int SnmpService = 72;
78
79
80
81
82 public OID ggObjectId = null;
83
84
85
86
87 public SysUpTime upTime = null;
88
89
90
91
92
93
94
95 public String applicationProtocolBase = null;
96
97
98
99
100 public OID applicationProtocol = null;
101
102
103
104
105 public String srootOIDGoldenGate;
106
107
108
109
110 public OID rootOIDGoldenGate;
111
112
113
114
115 public OID rootOIDGoldenGateNotif;
116
117
118
119
120 public OID rootOIDGoldenGateNotifStartOrShutdown;
121
122
123
124
125 public OID rootOIDGoldenGateInfo;
126
127
128
129
130 public GgMORow rowInfo;
131
132
133
134
135 public OID rootOIDGoldenGateGlobal;
136
137
138
139
140 public GgMORow rowGlobal;
141
142
143
144
145 public OID rootOIDGoldenGateGlobalUptime;
146
147
148
149
150 public GgMOScalar scalarUptime = null;
151
152
153
154
155 public OID rootOIDGoldenGateDetailed;
156
157
158
159
160 public GgMORow rowDetailed;
161
162
163
164
165 public OID rootOIDGoldenGateError;
166
167
168
169
170 public GgMORow rowError;
171
172
173
174
175 public SNMPv2MIB snmpv2;
176
177
178
179
180 public GgSnmpAgent agent;
181
182
183
184
185
186
187 public FtpPrivateMib(int port) {
188 srootOIDGoldenGate = rootEnterpriseMib.toString() + "." +
189 SnmpPrivateId + "." + SnmpFtpId;
190 applicationProtocolBase = srootOIDGoldenGate + ".1.1.4.";
191 ggObjectId = new OID(srootOIDGoldenGate);
192 applicationProtocol = new OID(applicationProtocolBase + port);
193 rootOIDGoldenGate = new OID(srootOIDGoldenGate);
194 rootOIDGoldenGateInfo = new OID(srootOIDGoldenGate + ".1");
195 rootOIDGoldenGateGlobal = new OID(srootOIDGoldenGate + ".2");
196 rootOIDGoldenGateGlobalUptime = new OID(
197 rootOIDGoldenGateGlobal.toString() + "." +
198 goldenGateGlobalValuesIndex.applUptime.getOID() + ".0");
199 rootOIDGoldenGateDetailed = new OID(srootOIDGoldenGate + ".3");
200 rootOIDGoldenGateError = new OID(srootOIDGoldenGate + ".4");
201 rootOIDGoldenGateNotif = new OID(srootOIDGoldenGate + ".5.1");
202 rootOIDGoldenGateNotifStartOrShutdown = new OID(srootOIDGoldenGate +
203 ".5.1.1.1");
204 }
205
206
207
208
209
210
211
212 protected void agentRegisterSystem() throws DuplicateRegistrationException {
213
214
215
216
217 agent.unregisterManagedObject(agent.getSnmpv2MIB());
218
219
220
221 snmpv2 = new SNMPv2MIB(new OctetString(SnmpName), ggObjectId,
222 new Integer32(SnmpService));
223 snmpv2.setContact(new OctetString(SnmpDefaultAuthor));
224 snmpv2.setLocation(new OctetString(SnmpDefaultLocalization));
225 snmpv2.setName(new OctetString(SnmpVersion));
226 snmpv2.registerMOs(agent.getServer(), null);
227 if (logger.isDebugEnabled()) {
228 logger.debug("SNMPV2: " + snmpv2.getContact() + ":" +
229 snmpv2.getDescr() + ":" + snmpv2.getLocation() + ":" +
230 snmpv2.getName() + ":" + snmpv2.getObjectID() + ":" +
231 snmpv2.getServices() + ":" + snmpv2.getUpTime());
232 }
233
234 upTime = snmpv2.getSysUpTime();
235 }
236
237
238
239
240
241
242 protected void agentRegisterGoldenGateMib()
243 throws DuplicateRegistrationException {
244 logger.debug("registerGGMib");
245
246 rowInfo = new GgMORow(this, rootOIDGoldenGateInfo,
247 goldenGateDefinition, MibLevel.staticInfo.ordinal());
248 rowInfo.setValue(goldenGateDefinitionIndex.applName.ordinal(),
249 "GoldenGate OpenR66");
250 rowInfo.setValue(goldenGateDefinitionIndex.applServerName.ordinal(),
251 FileBasedConfiguration.fileBasedConfiguration.HOST_ID);
252 rowInfo.setValue(goldenGateDefinitionIndex.applVersion.ordinal(),
253 Version.ID);
254 rowInfo.setValue(goldenGateDefinitionIndex.applDescription.ordinal(),
255 "GoldenGate OpenR66: File Transfer Monitor");
256 rowInfo.setValue(goldenGateDefinitionIndex.applURL.ordinal(),
257 "http://openr66.free.fr");
258 rowInfo.setValue(
259 goldenGateDefinitionIndex.applApplicationProtocol.ordinal(),
260 applicationProtocol);
261
262 rowInfo.registerMOs(agent.getServer(), null);
263
264 rowGlobal = new GgMORow(this, rootOIDGoldenGateGlobal,
265 goldenGateGlobalValues, MibLevel.globalInfo.ordinal());
266 GgMOScalar memoryScalar = rowGlobal.row[goldenGateGlobalValuesIndex.memoryTotal
267 .ordinal()];
268 memoryScalar.setValue(new MemoryGauge32(MemoryType.TotalMemory));
269 memoryScalar = rowGlobal.row[goldenGateGlobalValuesIndex.memoryFree
270 .ordinal()];
271 memoryScalar.setValue(new MemoryGauge32(MemoryType.FreeMemory));
272 memoryScalar = rowGlobal.row[goldenGateGlobalValuesIndex.memoryUsed
273 .ordinal()];
274 memoryScalar.setValue(new MemoryGauge32(MemoryType.UsedMemory));
275 rowGlobal.registerMOs(agent.getServer(), null);
276
277 scalarUptime = rowGlobal.row[goldenGateGlobalValuesIndex.applUptime
278 .ordinal()];
279 scalarUptime.setValue(new GgUptime(upTime));
280 changeStatus(OperStatus.restarting);
281 changeStatus(OperStatus.up);
282
283 rowDetailed = new GgMORow(this, rootOIDGoldenGateDetailed,
284 goldenGateDetailedValues, MibLevel.detailedInfo.ordinal());
285 rowDetailed.registerMOs(agent.getServer(), null);
286
287 rowError = new GgMORow(this, rootOIDGoldenGateError,
288 goldenGateErrorValues, MibLevel.errorInfo.ordinal());
289 rowError.registerMOs(agent.getServer(), null);
290 }
291
292
293
294
295 protected void agentUnregisterMibs() {
296 logger.debug("UnRegisterGoldenGate");
297 rowInfo.unregisterMOs(agent.getServer(), agent.getDefaultContext());
298 rowGlobal.unregisterMOs(agent.getServer(), agent.getDefaultContext());
299 rowDetailed.unregisterMOs(agent.getServer(), agent.getDefaultContext());
300 rowError.unregisterMOs(agent.getServer(), agent.getDefaultContext());
301 }
302
303
304
305
306
307
308
309 @Override
310 public void registerMOs(MOServer arg0, OctetString arg1)
311 throws DuplicateRegistrationException {
312 agentRegisterSystem();
313 agentRegisterGoldenGateMib();
314 }
315
316
317
318
319
320
321
322 @Override
323 public void unregisterMOs(MOServer arg0, OctetString arg1) {
324 agentUnregisterMibs();
325 }
326
327
328
329
330
331
332
333
334 @Override
335 public void setAgent(GgSnmpAgent agent) {
336 this.agent = agent;
337 }
338
339
340
341
342
343
344 @Override
345 public OID getBaseOidStartOrShutdown() {
346 return rootOIDGoldenGateNotifStartOrShutdown;
347 }
348
349
350
351
352
353
354 @Override
355 public SNMPv2MIB getSNMPv2MIB() {
356 return snmpv2;
357 }
358
359
360
361
362
363
364
365
366 @Override
367 public void updateServices(GgMOScalar scalar) {
368 }
369
370
371
372
373
374
375
376
377 @Override
378 public void updateServices(MOScope range) {
379 }
380
381
382
383
384
385
386 public void changeStatus(OperStatus status) {
387 GgMOScalar statusScalar = rowGlobal.row[goldenGateGlobalValuesIndex.applOperStatus
388 .ordinal()];
389 Integer32 var = (Integer32) statusScalar.getValue();
390 if (var.getValue() != status.status) {
391 var.setValue(status.status);
392 GgMOScalar lastTimeScalar = rowGlobal.row[goldenGateGlobalValuesIndex.applLastChange
393 .ordinal()];
394 TimeTicks time = (TimeTicks) lastTimeScalar.getValue();
395 time.setValue(upTime.get().getValue());
396 }
397 }
398
399
400
401
402
403
404
405 public void notifyStartStop(String message, String message2) {
406 if (!TrapLevel.StartStop.isLevelValid(agent.trapLevel)) return;
407 notify(NotificationElements.TrapShutdown, message, message2);
408 }
409
410
411
412
413
414
415
416 public void notifyError(String message, String message2) {
417 if (!TrapLevel.Alert.isLevelValid(agent.trapLevel)) return;
418 notify(NotificationElements.TrapError, message, message2);
419 }
420
421
422
423
424
425
426
427 public void notifyOverloaded(String message, String message2) {
428 if (!TrapLevel.Warning.isLevelValid(agent.trapLevel)) return;
429 notify(NotificationElements.TrapOverloaded, message, message2);
430 }
431
432
433
434
435
436
437
438 public void notifyWarning(String message, String message2) {
439 if (!TrapLevel.Warning.isLevelValid(agent.trapLevel)) return;
440 notify(NotificationElements.TrapWarning, message, message2);
441 }
442
443
444
445
446
447
448
449
450 public void notifyInfoTask(String message, DbTransferLog runner) {
451 if (!TrapLevel.All.isLevelValid(agent.trapLevel)) return;
452 if (logger.isDebugEnabled())
453 logger.debug("Notify: " + NotificationElements.InfoTask + ":" +
454 message + ":" + runner);
455 long delay = (runner.getStart().getTime() - agent.getUptimeSystemTime()) / 10;
456 if (delay < 0) delay = 0;
457 agent.getNotificationOriginator().notify(
458 new OctetString("public"),
459 NotificationElements.InfoTask.getOID(rootOIDGoldenGateNotif),
460 new VariableBinding[] {
461 new VariableBinding(NotificationElements.InfoTask
462 .getOID(rootOIDGoldenGateNotif, 1),
463 new OctetString(NotificationElements.InfoTask
464 .name())),
465 new VariableBinding(NotificationElements.InfoTask
466 .getOID(rootOIDGoldenGateNotif, 1),
467 new OctetString(message)),
468
469 new VariableBinding(
470 NotificationElements.InfoTask
471 .getOID(rootOIDGoldenGateNotif,
472 NotificationTasks.filenameInfo
473 .getOID()),
474 new OctetString(runner.getFilename())),
475 new VariableBinding(NotificationElements.InfoTask
476 .getOID(rootOIDGoldenGateNotif,
477 NotificationTasks.modeTransInfo
478 .getOID()),
479 new OctetString(runner.getMode())),
480 new VariableBinding(NotificationElements.InfoTask
481 .getOID(rootOIDGoldenGateNotif,
482 NotificationTasks.startTransInfo
483 .getOID()),
484 new TimeTicks(delay)),
485 new VariableBinding(NotificationElements.InfoTask
486 .getOID(rootOIDGoldenGateNotif,
487 NotificationTasks.infoStatusInfo
488 .getOID()), new OctetString(
489 runner.getErrorInfo().getMesg())),
490 new VariableBinding(NotificationElements.InfoTask
491 .getOID(rootOIDGoldenGateNotif,
492 NotificationTasks.userIdInfo
493 .getOID()), new OctetString(
494 runner.getUser())),
495 new VariableBinding(NotificationElements.InfoTask
496 .getOID(rootOIDGoldenGateNotif,
497 NotificationTasks.accountId
498 .getOID()), new OctetString(
499 runner.getAccount())),
500 new VariableBinding(NotificationElements.InfoTask
501 .getOID(rootOIDGoldenGateNotif,
502 NotificationTasks.specialIdInfo
503 .getOID()), new OctetString("" +
504 runner.getSpecialId())),
505
506 new VariableBinding(SnmpConstants.sysDescr, snmpv2
507 .getDescr()),
508 new VariableBinding(SnmpConstants.sysObjectID, snmpv2
509 .getObjectID()),
510 new VariableBinding(SnmpConstants.sysContact, snmpv2
511 .getContact()),
512 new VariableBinding(SnmpConstants.sysName, snmpv2
513 .getName()),
514 new VariableBinding(SnmpConstants.sysLocation, snmpv2
515 .getLocation()) });
516 }
517
518
519
520
521
522
523
524
525 private void notify(NotificationElements element, String message,
526 String message2) {
527 if (logger.isDebugEnabled())
528 logger.debug("Notify: " + element + ":" + message + ":" + message2);
529 agent.getNotificationOriginator().notify(
530 new OctetString("public"),
531 element.getOID(rootOIDGoldenGateNotif),
532 new VariableBinding[] {
533 new VariableBinding(element.getOID(
534 rootOIDGoldenGateNotif, 1), new OctetString(
535 element.name())),
536 new VariableBinding(element.getOID(
537 rootOIDGoldenGateNotif, 1), new OctetString(
538 message)),
539 new VariableBinding(element.getOID(
540 rootOIDGoldenGateNotif, 1), new OctetString(
541 message2)),
542 new VariableBinding(SnmpConstants.sysDescr, snmpv2
543 .getDescr()),
544 new VariableBinding(SnmpConstants.sysObjectID, snmpv2
545 .getObjectID()),
546 new VariableBinding(SnmpConstants.sysContact, snmpv2
547 .getContact()),
548 new VariableBinding(SnmpConstants.sysName, snmpv2
549 .getName()),
550 new VariableBinding(SnmpConstants.sysLocation, snmpv2
551 .getLocation()) });
552 }
553
554
555
556
557
558
559
560 public static enum MibLevel {
561 staticInfo, globalInfo, detailedInfo, errorInfo, trapInfo
562 }
563
564
565
566
567
568
569
570
571 public static enum NotificationElements {
572 TrapShutdown(1),
573 TrapError(2),
574 TrapWarning(3),
575 TrapOverloaded(4),
576 InfoTask(5);
577
578 public int[] oid;
579
580 private NotificationElements(int oid) {
581 this.oid = new int[] {
582 oid };
583 }
584
585 public OID getOID(OID oidBase) {
586 return new OID(oidBase.getValue(), this.oid);
587 }
588
589 public OID getOID(OID oidBase, int rank) {
590 int[] ids = new int[] {
591 this.oid[0], rank };
592 return new OID(oidBase.getValue(), ids);
593 }
594 }
595
596
597
598
599
600
601
602 public static enum NotificationTasks {
603 filenameInfo, modeTransInfo, startTransInfo, infoStatusInfo, userIdInfo,
604 accountId, specialIdInfo;
605
606 public int getOID() {
607 return this.ordinal() + 1;
608 }
609 }
610
611
612
613
614
615
616
617 public static enum goldenGateDefinitionIndex {
618 applName,
619 applServerName,
620 applVersion,
621 applDescription,
622 applURL,
623 applApplicationProtocol;
624
625 public int getOID() {
626 return this.ordinal() + 1;
627 }
628 }
629
630
631
632
633 public static GgEntry[] goldenGateDefinition = {
634
635 new GgEntry(SMIConstants.SYNTAX_OCTET_STRING,
636 MOAccessImpl.ACCESS_READ_ONLY),
637
638 new GgEntry(SMIConstants.SYNTAX_OCTET_STRING,
639 MOAccessImpl.ACCESS_READ_ONLY),
640
641 new GgEntry(SMIConstants.SYNTAX_OCTET_STRING,
642 MOAccessImpl.ACCESS_READ_ONLY),
643
644 new GgEntry(SMIConstants.SYNTAX_OCTET_STRING,
645 MOAccessImpl.ACCESS_READ_ONLY),
646
647 new GgEntry(SMIConstants.SYNTAX_OCTET_STRING,
648 MOAccessImpl.ACCESS_READ_ONLY),
649
650 new GgEntry(SMIConstants.SYNTAX_OBJECT_IDENTIFIER,
651 MOAccessImpl.ACCESS_READ_ONLY) };
652
653
654
655
656
657
658
659 public static enum goldenGateGlobalValuesIndex {
660 applUptime,
661 applOperStatus,
662 applLastChange,
663 applInboundAssociations,
664 applOutboundAssociations,
665 applAccumInboundAssociations,
666 applAccumOutboundAssociations,
667 applLastInboundActivity,
668 applLastOutboundActivity,
669 applRejectedInboundAssociations,
670 applFailedOutboundAssociations,
671 applInboundBandwidthKBS,
672 applOutboundBandwidthKBS,
673 nbInfoUnknown,
674 nbInfoNotUpdated,
675 nbInfoInterrupted,
676 nbInfoToSubmit,
677 nbInfoError,
678 nbInfoRunning,
679 nbInfoDone,
680 nbAllTransfer,
681 memoryTotal,
682 memoryFree,
683 memoryUsed,
684 nbThreads,
685 nbNetworkConnection;
686
687 public int getOID() {
688 return this.ordinal() + 1;
689 }
690 }
691
692
693
694
695 public static GgEntry[] goldenGateGlobalValues = {
696
697 new GgEntry(SMIConstants.SYNTAX_TIMETICKS,
698 MOAccessImpl.ACCESS_READ_ONLY),
699
700 new GgEntry(SMIConstants.SYNTAX_INTEGER,
701 MOAccessImpl.ACCESS_READ_ONLY),
702
703 new GgEntry(SMIConstants.SYNTAX_TIMETICKS,
704 MOAccessImpl.ACCESS_READ_ONLY),
705
706 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
707 MOAccessImpl.ACCESS_READ_ONLY),
708
709 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
710 MOAccessImpl.ACCESS_READ_ONLY),
711
712 new GgEntry(SMIConstants.SYNTAX_COUNTER32,
713 MOAccessImpl.ACCESS_READ_ONLY),
714
715 new GgEntry(SMIConstants.SYNTAX_COUNTER32,
716 MOAccessImpl.ACCESS_READ_ONLY),
717
718 new GgEntry(SMIConstants.SYNTAX_TIMETICKS,
719 MOAccessImpl.ACCESS_READ_ONLY),
720
721 new GgEntry(SMIConstants.SYNTAX_TIMETICKS,
722 MOAccessImpl.ACCESS_READ_ONLY),
723
724 new GgEntry(SMIConstants.SYNTAX_COUNTER32,
725 MOAccessImpl.ACCESS_READ_ONLY),
726
727 new GgEntry(SMIConstants.SYNTAX_COUNTER32,
728 MOAccessImpl.ACCESS_READ_ONLY),
729
730
731 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
732 MOAccessImpl.ACCESS_READ_ONLY),
733
734 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
735 MOAccessImpl.ACCESS_READ_ONLY),
736
737
738 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
739 MOAccessImpl.ACCESS_READ_ONLY),
740
741 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
742 MOAccessImpl.ACCESS_READ_ONLY),
743
744 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
745 MOAccessImpl.ACCESS_READ_ONLY),
746
747 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
748 MOAccessImpl.ACCESS_READ_ONLY),
749
750 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
751 MOAccessImpl.ACCESS_READ_ONLY),
752
753 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
754 MOAccessImpl.ACCESS_READ_ONLY),
755
756 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
757 MOAccessImpl.ACCESS_READ_ONLY),
758
759
760 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
761 MOAccessImpl.ACCESS_READ_ONLY),
762
763 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
764 MOAccessImpl.ACCESS_READ_ONLY),
765
766 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
767 MOAccessImpl.ACCESS_READ_ONLY),
768
769 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
770 MOAccessImpl.ACCESS_READ_ONLY),
771
772 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
773 MOAccessImpl.ACCESS_READ_ONLY),
774
775 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
776 MOAccessImpl.ACCESS_READ_ONLY) };
777
778
779
780
781
782
783
784 public static enum goldenGateDetailedValuesIndex {
785 reply_000(ReplyCode.REPLY_000_SPECIAL_NOSTATUS),
786 reply_110(ReplyCode.REPLY_110_RESTART_MARKER_REPLY),
787 reply_120(ReplyCode.REPLY_120_SERVICE_READY_IN_NNN_MINUTES),
788 reply_125(ReplyCode.REPLY_125_DATA_CONNECTION_ALREADY_OPEN),
789 reply_150(ReplyCode.REPLY_150_FILE_STATUS_OKAY),
790 reply_200(ReplyCode.REPLY_200_COMMAND_OKAY),
791 reply_202(ReplyCode.REPLY_202_COMMAND_NOT_IMPLEMENTED),
792 reply_211(ReplyCode.REPLY_211_SYSTEM_STATUS_REPLY),
793 reply_212(ReplyCode.REPLY_212_DIRECTORY_STATUS),
794 reply_213(ReplyCode.REPLY_213_FILE_STATUS),
795 reply_214(ReplyCode.REPLY_214_HELP_MESSAGE),
796 reply_215(ReplyCode.REPLY_215_NAME_SYSTEM_TYPE),
797 reply_220(ReplyCode.REPLY_220_SERVICE_READY),
798 reply_221(ReplyCode.REPLY_221_CLOSING_CONTROL_CONNECTION),
799 reply_225(ReplyCode.REPLY_225_DATA_CONNECTION_OPEN_NO_TRANSFER_IN_PROGRESS),
800 reply_226(ReplyCode.REPLY_226_CLOSING_DATA_CONNECTION),
801 reply_227(ReplyCode.REPLY_227_ENTERING_PASSIVE_MODE),
802 reply_229(ReplyCode.REPLY_229_ENTERING_PASSIVE_MODE),
803 reply_230(ReplyCode.REPLY_230_USER_LOGGED_IN),
804 reply_250(ReplyCode.REPLY_250_REQUESTED_FILE_ACTION_OKAY),
805 reply_257(ReplyCode.REPLY_257_PATHNAME_CREATED),
806 reply_331(ReplyCode.REPLY_331_USER_NAME_OKAY_NEED_PASSWORD),
807 reply_332(ReplyCode.REPLY_332_NEED_ACCOUNT_FOR_LOGIN),
808 reply_350(ReplyCode.REPLY_350_REQUESTED_FILE_ACTION_PENDING_FURTHER_INFORMATION);
809
810 public ReplyCode code;
811
812 private goldenGateDetailedValuesIndex(ReplyCode code) {
813 this.code = code;
814 }
815 public int getOID() {
816 return this.ordinal() + 1;
817 }
818 }
819
820
821
822
823 public static GgEntry[] goldenGateDetailedValues = {
824
825 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
826 MOAccessImpl.ACCESS_READ_ONLY),
827
828 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
829 MOAccessImpl.ACCESS_READ_ONLY),
830
831 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
832 MOAccessImpl.ACCESS_READ_ONLY),
833
834 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
835 MOAccessImpl.ACCESS_READ_ONLY),
836
837 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
838 MOAccessImpl.ACCESS_READ_ONLY),
839
840 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
841 MOAccessImpl.ACCESS_READ_ONLY),
842
843 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
844 MOAccessImpl.ACCESS_READ_ONLY),
845
846 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
847 MOAccessImpl.ACCESS_READ_ONLY),
848
849 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
850 MOAccessImpl.ACCESS_READ_ONLY),
851
852 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
853 MOAccessImpl.ACCESS_READ_ONLY),
854
855 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
856 MOAccessImpl.ACCESS_READ_ONLY),
857
858 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
859 MOAccessImpl.ACCESS_READ_ONLY),
860
861 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
862 MOAccessImpl.ACCESS_READ_ONLY),
863
864 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
865 MOAccessImpl.ACCESS_READ_ONLY),
866
867 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
868 MOAccessImpl.ACCESS_READ_ONLY),
869
870 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
871 MOAccessImpl.ACCESS_READ_ONLY),
872
873 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
874 MOAccessImpl.ACCESS_READ_ONLY),
875
876 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
877 MOAccessImpl.ACCESS_READ_ONLY),
878
879 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
880 MOAccessImpl.ACCESS_READ_ONLY),
881
882 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
883 MOAccessImpl.ACCESS_READ_ONLY),
884
885 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
886 MOAccessImpl.ACCESS_READ_ONLY),
887
888 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
889 MOAccessImpl.ACCESS_READ_ONLY),
890
891 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
892 MOAccessImpl.ACCESS_READ_ONLY),
893
894 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
895 MOAccessImpl.ACCESS_READ_ONLY) };
896
897
898
899
900
901
902
903 public static enum goldenGateErrorValuesIndex {
904 reply_421(ReplyCode.REPLY_421_SERVICE_NOT_AVAILABLE_CLOSING_CONTROL_CONNECTION),
905 reply_425(ReplyCode.REPLY_425_CANT_OPEN_DATA_CONNECTION),
906 reply_426(ReplyCode.REPLY_426_CONNECTION_CLOSED_TRANSFER_ABORTED),
907 reply_450(ReplyCode.REPLY_450_REQUESTED_FILE_ACTION_NOT_TAKEN),
908 reply_451(ReplyCode.REPLY_451_REQUESTED_ACTION_ABORTED),
909 reply_452(ReplyCode.REPLY_452_REQUESTED_ACTION_NOT_TAKEN),
910 reply_500(ReplyCode.REPLY_500_SYNTAX_ERROR_COMMAND_UNRECOGNIZED),
911 reply_501(ReplyCode.REPLY_501_SYNTAX_ERROR_IN_PARAMETERS_OR_ARGUMENTS),
912 reply_502(ReplyCode.REPLY_502_COMMAND_NOT_IMPLEMENTED),
913 reply_503(ReplyCode.REPLY_503_BAD_SEQUENCE_OF_COMMANDS),
914 reply_504(ReplyCode.REPLY_504_COMMAND_NOT_IMPLEMENTED_FOR_THAT_PARAMETER),
915 reply_522(ReplyCode.REPLY_522_EXTENDED_PORT_FAILURE_UNKNOWN_NETWORK_PROTOCOL),
916 reply_530(ReplyCode.REPLY_530_NOT_LOGGED_IN),
917 reply_532(ReplyCode.REPLY_532_NEED_ACCOUNT_FOR_STORING_FILES),
918 reply_550(ReplyCode.REPLY_550_REQUESTED_ACTION_NOT_TAKEN),
919 reply_551(ReplyCode.REPLY_551_REQUESTED_ACTION_ABORTED_PAGE_TYPE_UNKNOWN),
920 reply_552(ReplyCode.REPLY_552_REQUESTED_FILE_ACTION_ABORTED_EXCEEDED_STORAGE),
921 reply_553(ReplyCode.REPLY_553_REQUESTED_ACTION_NOT_TAKEN_FILE_NAME_NOT_ALLOWED);
922
923 public ReplyCode code;
924
925 private goldenGateErrorValuesIndex(ReplyCode code) {
926 this.code = code;
927 }
928
929 public int getOID() {
930 return this.ordinal() + 1;
931 }
932 }
933
934
935
936
937 public static GgEntry[] goldenGateErrorValues = {
938
939 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
940 MOAccessImpl.ACCESS_READ_ONLY),
941
942 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
943 MOAccessImpl.ACCESS_READ_ONLY),
944
945 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
946 MOAccessImpl.ACCESS_READ_ONLY),
947
948 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
949 MOAccessImpl.ACCESS_READ_ONLY),
950
951 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
952 MOAccessImpl.ACCESS_READ_ONLY),
953
954 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
955 MOAccessImpl.ACCESS_READ_ONLY),
956
957 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
958 MOAccessImpl.ACCESS_READ_ONLY),
959
960 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
961 MOAccessImpl.ACCESS_READ_ONLY),
962
963 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
964 MOAccessImpl.ACCESS_READ_ONLY),
965
966 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
967 MOAccessImpl.ACCESS_READ_ONLY),
968
969 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
970 MOAccessImpl.ACCESS_READ_ONLY),
971
972 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
973 MOAccessImpl.ACCESS_READ_ONLY),
974
975 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
976 MOAccessImpl.ACCESS_READ_ONLY),
977
978 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
979 MOAccessImpl.ACCESS_READ_ONLY),
980
981 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
982 MOAccessImpl.ACCESS_READ_ONLY),
983
984 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
985 MOAccessImpl.ACCESS_READ_ONLY),
986
987 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
988 MOAccessImpl.ACCESS_READ_ONLY),
989
990 new GgEntry(SMIConstants.SYNTAX_GAUGE32,
991 MOAccessImpl.ACCESS_READ_ONLY) };
992
993
994
995
996
997
998
999 public static enum OperStatus {
1000 up(1), down(2), halted(3), congested(4), restarting(5), quiescing(6);
1001
1002 public int status;
1003
1004 private OperStatus(int status) {
1005 this.status = status;
1006 }
1007 }
1008
1009 }