A

lmost all traps that are sent based on the “System Messages” (type=9) are sent with status severity “Info” for trap.

We are just sending a trap for the system message.  All we have at that time is the system message text, we do not have the context of the message to determine a status.

There is a server shutdown message that is sent with a warning status.

 

Job Monitors are always warnings.  We do not change the status based on the status the monitor times.

 

Messages sent specifically for job/suite statuses are sent with these statuses.

 

 

    public JobSuitesStatusSNMPTrap(JobSuiteStatus jobSuiteStatus){

       

        if(jobSuiteStatus.equals(JobSuiteStatus.RUNNING)) {

            setType(SPECIFIC_JOB_SUITE_RUNNING);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_INFORMATION);

            return;

        }   

        

        if(jobSuiteStatus.equals(JobSuiteStatus.COMPLETED)) {

            setType(SPECIFIC_JOB_SUITE_COMPLETED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_INFORMATION);

        }

       

        if(jobSuiteStatus.equals(JobSuiteStatus.MEMBER_CANCELED)) {

            setType(SPECIFIC_JOB_SUITE_MEMEBER_CANCELED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_WARNING);

        }

       

        if(jobSuiteStatus.equals(JobSuiteStatus.MEMBER_FAILED)) {

            setType(SPECIFIC_JOB_SUITE_MEMBER_FAILED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_ATTENTION);

        }

       

        if(jobSuiteStatus.equals(JobSuiteStatus.SKIPPED)) {

            setType(SPECIFIC_JOB_SUITE_SKIPPED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_INFORMATION);

        }

    }

 

 

    public JobStatusSNMPTrap(JobStatusCode jobStatusCode) {

 

        if (jobStatusCode.equals(JobStatusCode.SUBMITTED)) {

            setType(SPECIFIC_JOB_SUBMITTED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_INFORMATION);

            return;

        }

 

        if (jobStatusCode.equals(JobStatusCode.RUNNING)) {

            setType(SPECIFIC_JOB_RUNNING);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_INFORMATION);

            return;           

        }

 

        if (jobStatusCode.equals(JobStatusCode.COMPLETED)) {

            setType(SPECIFIC_JOB_COMPLETED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_INFORMATION);

            return;           

        }

 

        if (jobStatusCode.equals(JobStatusCode.ERROR) ||

                jobStatusCode.equals(JobStatusCode.FAILED)) {

            setType(SPECIFIC_JOB_FAILED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_ATTENTION);

            return;           

        }

 

        if (jobStatusCode.equals(JobStatusCode.CANCELED)) {

            setType(SPECIFIC_JOB_CANCELED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_WARNING);

            return;           

        }

       

        if (jobStatusCode.equals(JobStatusCode.CONDITION_RETRY_WAIT)) {

            setType(SPECIFIC_JOB_RETRY_WAIT);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_INFORMATION);

            return;           

        }

       

        if (jobStatusCode.equals(JobStatusCode.SKIPPED)) {

            setType(SPECIFIC_JOB_SKIPPED);

            setSeverity(EnterpriseSNMPTrap.SEVERITY_INFORMATION);

            return;           

        }

       

    }