7 Replies Latest reply on Feb 4, 2018 11:41 PM by Akash Vekhande

    command for "compJobRunId"

    Akash Vekhande

      Hello Team,

       

      I am trying to perform below command :-

      blcli ComplianceJob createRemediationJobFromComplianceResultByServer $REMEDIATION_JOB_NAME $JOB_GROUP_NAME $DEPOT_GROUP_NAME $COMP_JOB_DBKEY $COMP_JOB_RUN_ID $TARGET_SERVER $TEMPLATE_GROUP_NAME $TEMPLATE_NAME $TARGET_COMPONENT $RULE_GROUP_NAME $RULE_NAME

       

      I am providing below details:-

       

      REMEDIATION_JOB_NAME  Windows update service

      JOB_GROUP_NAME             /Workspace

      DEPOT_GROUP_NAME       /BladeLogic     

      TARGET_SERVER              *******

      TEMPLATE_GROUP_NAME  /AKASH

      TEMPLATE_NAME        Windows 2012 R2 Standard Congifiguration

       

       

      where I get below information:-

       

      COMP_JOB_DBKEY            

      COMP_JOB_RUN_ID  

      RULE_GROUP_NAME

      RULE_NAME

       

      Kindly suggest.

       

      Regards,

      Akki...

        • 1. Re: command for "compJobRunId"
          Jim Wilson

          What is the result?

          Please show your execution

          • 2. Re: command for "compJobRunId"
            Akash Vekhande

            Hello Jim Wilson,

             

            Actually I am trying to perform below use-case using BSA and AO:-

             

            BMC BladeLogic Server Automation example integration scenario - Documentation for BMC Atrium Orchestrator Platform 7.8 -…

             

            and below steps I have performed :-

             

            1 create compliance job and execute the job against target server and sent SNMP traps to AO for inconsistent servers.

            2 trying to create workflow that should create remediation job and execute that job on  non complaint servers.

             

            with the help of below workflow:-

             

            Create Remediation Job from Compliance Result

             

            In this workflow I see below command:-

             

            blcli ComplianceJob createRemediationJobFromComplianceResultByServer

             

            I have provided below details to AO workflow as input:-

             

            jobGroupName    /Workspace

            depotGroupName  /BladeLogic

            compJobParentGroup /Workspace   

            compJob Name       Windows update service

            compJobRunId       DBKey:SJobModelKeyImpl:2658-4-2168279

            targetServer      *********

            templateGroupName  /AKASH

            templateName       Windows 2012 R2 Standard Congifiguration

            targetComponent    xyz

            ruleGrpName        Windows 2012 R2 Standard Congifiguration

            ruleName           Windows Update Service is Running and set to Auto Start

             

            I am getting below error:-

             

            Command execution failed. com.bladelogic.om.infra.cli.factory.CommandNotFoundException: ComplianceJob,createRemediationJobFromComplianceResultByServer Method found but with mismatching arguments. Error was : Input '2658-4-2168279' cannot be converted to expected type : int

             

            So I am stuck at can I entered correct details? and how I get compJobRunId ?

             

            Regards,

            Akki

            • 3. Re: command for "compJobRunId"
              Bill Robinson

              you have spaces in the variable values and you aren't double-quoting the variable references.  i'd start  by fixing that.

              • 4. Re: command for "compJobRunId"
                Akash Vekhande

                Thanks Bill Robinson,

                 

                I have added all details in double-quoted, but still facing the issue with respect to job run id.

                 

                below is the error:-

                 

                <command>blcli_execute ComplianceJob createRemediationJobFromComplianceResultByServer "REMEDIATION_Created_By_AO" "/Workspace" "/BladeLogic" "DBKey:SJobModelKeyImpl:2658-4-2168279" "2000040" "CIVPWINSQL12-01" "/AKASH" "Windows 2012 R2 Standard Congifiguration" "CIVPWINSQL12-01" "ruleGroupNo1" "ruleNo1"  </command>

                            <line-count>1</line-count>

                            <execution-milliseconds>754</execution-milliseconds>

                            <exit-code>1</exit-code>

                            <status>error</status>

                            <error>Exit code indicates error</error>

                          </metadata>

                          <output>

                            <line index="1">Command execution failed. com.bladelogic.om.infra.mfw.util.NotFoundException: job run with id 2000040 not found</line>

                          </output>

                 

                Can anyone tell me from below SNMP trap what is the job run id:-

                 

                30 Jan 2018 16:27:10,290 [Thread=Thread-136] DEBUG TrapProcessor   [PeerName=CDP]  [AdapterName=SNMPMonitor]  CommandResponderEvent[securityModel=1, securityLevel=1, maxSizeResponsePDU=65535, pduHandle=PduHandle[0], stateReference=StateReference[msgID=0,pduHandle=PduHandle[0],securityEngineID=null,securityModel=null,securityName=public,securityLevel=1,contextEngineID=null,contextName=null,retryMsgIDs=null], pdu=V1TRAP[reqestID=0,timestamp=0:00:00.00,enterprise=1.3.6.1.4.1.12788,genericTrap=6,specificTrap=1004, VBS[1.3.6.1.4.1.12788.1.1.1 = Windows Update Service; 1.3.6.1.4.1.12788.1.1.2 = Tue Jan 30 16:27:09 IST 2018; 1.3.6.1.4.1.12788.1.1.3 = Tue Jan 30 16:27:18 IST 2018; 1.3.6.1.4.1.12788.1.1.6 = 2000040; 1.3.6.1.4.1.12788.1.1.7 = 5588; 1.3.6.1.4.1.12788.1.1.8 = 5106; 1.3.6.1.4.1.12788.1.5.1 = -10008; 1.3.6.1.4.1.12788.1.5.2 = Windows 2012 R2 Standard Configuration; 1.3.6.1.4.1.12788.1.5.3 = Windows Update Service is Running and set to Auto Start]], messageProcessingModel=0, securityName=public, processed=false, peerAddress=10.20.110.146/35000, transportMapping=org.snmp4j.transport.DefaultUdpTransportMapping@fbdddc9, tmStateReference=null]

                30 Jan 2018 16:27:10,290 [Thread=Thread-136] DEBUG TrapProcessor   [PeerName=CDP]  [AdapterName=SNMPMonitor]  V1TRAP[reqestID=0,timestamp=0:00:00.00,enterprise=1.3.6.1.4.1.12788,genericTrap=6,specificTrap=1004, VBS[1.3.6.1.4.1.12788.1.1.1 = Windows Update Service; 1.3.6.1.4.1.12788.1.1.2 = Tue Jan 30 16:27:09 IST 2018; 1.3.6.1.4.1.12788.1.1.3 = Tue Jan 30 16:27:18 IST 2018; 1.3.6.1.4.1.12788.1.1.6 = 2000040; 1.3.6.1.4.1.12788.1.1.7 = 5588; 1.3.6.1.4.1.12788.1.1.8 = 5106; 1.3.6.1.4.1.12788.1.5.1 = -10008; 1.3.6.1.4.1.12788.1.5.2 = Windows 2012 R2 Standard Configuration; 1.3.6.1.4.1.12788.1.5.3 = Windows Update Service is Running and set to Auto Start]]

                SnmpMonitorAdapter:TrapProcessor: Received V1 Trap: <trap>

                  <host>********</host>

                  <sysuptime>0</sysuptime>

                  <enterprise>.1.3.6.1.4.1.12788</enterprise>

                  <generic-trap-type>6</generic-trap-type>

                  <specific-trap-type>1004</specific-trap-type>

                  <varbinds>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.1.1</oid>

                      <value>Windows Update Service</value>

                    </varbind>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.1.2</oid>

                      <value>Tue Jan 30 16:27:09 IST 2018</value>

                    </varbind>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.1.3</oid>

                      <value>Tue Jan 30 16:27:18 IST 2018</value>

                    </varbind>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.1.6</oid>

                      <value>2000040</value>

                    </varbind>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.1.7</oid>

                      <value>5588</value>

                    </varbind>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.1.8</oid>

                      <value>5106</value>

                    </varbind>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.5.1</oid>

                      <value>-10008</value>

                    </varbind>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.5.2</oid>

                      <value>Windows 2012 R2 Standard Configuration</value>

                    </varbind>

                    <varbind>

                      <oid>.1.3.6.1.4.1.12788.1.5.3</oid>

                      <value>Windows Update Service is Running and set to Auto Start</value>

                    </varbind>

                  </varbinds>

                </trap>

                 

                Kindly assist.

                 

                Regards,

                Akki

                • 5. Re: command for "compJobRunId"
                  Bill Robinson

                  I have added all details in double-quoted, but still facing the issue with respect to job run id.

                  no, you are facing a different issue.  first you said you got this error:

                  ComplianceJob,createRemediationJobFromComplianceResultByServer Method found but with mismatching arguments. Error was : Input '2658-4-2168279' cannot be converted to expected type : int

                  which indicated that you were not passing in the correct input type to one of the arguments.  you were passing 2658-4-2168279 to an argument that expected an int.  2658-4-2168279 is not an int.

                   

                  now, you seem to have cleaned up your command so you are properly handling spaces and you are getting a different error:

                  Command execution failed. com.bladelogic.om.infra.mfw.util.NotFoundException: job run with id 2000040 not found

                  this message means exactly what it says - there is no job run w/ the id of 2000040.  ok, so how are you getting the job run id ?

                   

                  Can anyone tell me from below SNMP trap what is the job run id:-

                  have you looked at the NSH/share/BladeLogic.mib ?  that tells you how to read the trap.

                  • 6. Re: command for "compJobRunId"
                    Bill Robinson

                    since you deleted your reply i'm assuming you figured it out ?

                     

                    jcRunId OBJECT-TYPE

                    SYNTAX INTEGER

                    ACCESS not-accessible

                    STATUS mandatory

                    DESCRIPTION

                            "This integer is the job run Id."

                    ::= { job-generic 7}

                    so:

                        <varbind>

                          <oid>.1.3.6.1.4.1.12788.1.1.7</oid>

                          <value>5588</value>

                        </varbind>

                    ?

                    • 7. Re: command for "compJobRunId"
                      Akash Vekhande

                      Hello Bill Robinson,

                       

                      I am doing trial and error on value of job id as I am not getting exact value from SNMP trap.

                       

                      have you looked at the NSH/share/BladeLogic.mib ?  that tells you how to read the trap.

                       

                      -Yes I had looked at the BladeLogic.mib file and I found below information for compliance result job:-

                       

                      trapComplianceResults TRAP-TYPE

                              ENTERPRISE bladelogic

                              VARIABLES  { jcJobName, jcStartTime, jcEndTime, jcGroupId, jcRunId, jcTypeId, crConsType, crTemplateName, crRuleName}

                              DESCRIPTION

                                  "A scheduled BMC BladeLogic compliance has finished.  Please view the event or

                                   go to the BMC BladeLogic Console for further details."

                       

                      -Using this information I tried to find job id and I assumed that 1.1.5 is the jcRunId but I am wrong.

                       

                      Then I tried to find out BladeLogic_Trap_Mappings and I got how to find out jcRunID with the help of below link:-

                       

                      Updating module configuration for Continuous Compliance for Server Automation for ServiceNow - Documentation for BMC Atr…

                       

                      since you deleted your reply i'm assuming you figured it out ?

                      -Yes I figured it out after my post that's why I deleted my post and updated today.

                       

                      so:

                          <varbind>

                            <oid>.1.3.6.1.4.1.12788.1.1.7</oid>

                            <value>5588</value>

                          </varbind>

                      - Yes, Correct.

                       

                      Thank you very much for your support.

                       

                      Regards,

                      Akki...