ON THIS PAGE
Generation, Collection, and Processing of a JMB
Before a device can be managed by Junos Space Network Management Platform, the device must be discovered by Junos Space Platform. After a device is discovered by Junos Space Platform, the following configuration is added to the device:
set system syslog file default-log-messages match "<Platform dependent filter>" set system syslog file default-log-messages any info set system syslog file default-log-messages structured-data set snmp trap-group space targets <Space UI VIP>
After AI-Scripts are installed on the device, the following configuration is added to the device:
set groups juniper-ais system scripts commit allow-transients set groups juniper-ais system scripts commit file jais-activate-scripts.slax optional set groups juniper-ais system scripts op file ais_change_perm.slax set groups juniper-ais system scripts op file ais_core_perm.slax set groups juniper-ais system scripts op file on-demand.slax set groups juniper-ais system scripts op file remove-jais.slax set groups juniper-ais system scripts op file ais_arc.slax set groups juniper-ais system scripts op file ais-attach-file.slax set groups juniper-ais system scripts op file stop-ais-now.slax set groups juniper-ais system scripts op file ais_signalSN.slax set groups juniper-ais system scripts op file ais_core_chm.slax set groups juniper-ais system scripts op file ais_all_chm.slax set groups juniper-ais system scripts op file att_signalSN.slax set groups juniper-ais system scripts op file ais-rsi-chk.slax set groups juniper-ais system scripts op file ais-param-set.slax set groups juniper-ais system scripts op file ais-sleep.slax set groups juniper-ais system scripts op file ais-error.slax set groups juniper-ais system scripts op file ais-health-report.slax set groups juniper-ais system scripts op file ais_xfer_jmb.slax set groups juniper-ais system scripts op file ais_policy_create.slax set groups juniper-ais event-options event-script max-datasize 128m set groups juniper-ais event-options event-script file intelligence-event-main.slax set groups juniper-ais event-options event-script file bios.slax set groups juniper-ais event-options event-script file phdc.slax set groups juniper-ais event-options event-script file Master-event-struct.slax set groups juniper-ais event-options event-script file Master-event-unstruct.slax set groups juniper-ais event-options event-script file Master-policy-events.slax set groups juniper-ais event-options event-script file User-event-struct.slax set groups juniper-ais event-options event-script file User-event-unstruct.slax set groups juniper-ais event-options event-script file User-policy-events.slax set groups juniper-ais event-options event-script file jais-scripts-add.slax set groups juniper-ais event-options destinations juniper-aim archive-sites /var/tmp/ set apply-groups juniper-ais
When an event occurs on a device, the Junos OS running on the device generates the following logs:
/var/log/escript.log
—Theescript.log
file records actions performed by event scripts included in the AI-Scripts bundle.</jmb>Sep 24 15:28:42 end dump Sep 24 15:28:42 finished event script 'Master-event-struct.slax' Sep 24 15:28:42 event script processing ends
/var/log/default-log-messages
—Thedefault-log-message
file contains information about operations performed on the device—that is, when commits are executed and AI-Scripts have generated data ready for Service Now to collect, and information about other events that is required by Junos Space Platform or connected applications.<13>1 2015-09-24T15:29:07.622-07:00 mx-2 cscript - - - AIS_DATA_AVAILABLE: To be Transferred : JMB ready for upload /var/tmp/mx-2_15_jmb_ais_prob_20150924_152842 size=19687 <13>1 2015-09-24T15:31:03.744-07:00 mx-2 cscript - - - AIS_DATA_AVAILABLE: To be Transferred : All attachments ready for upload
/var/log/op-script.log
—Theop-script.log
file records actions performed by operational scripts included in the AI-Scripts bundle.Sep 24 15:31:02 op script processing begins Sep 24 15:31:02 reading op script input details Sep 24 15:31:02 testing op details Sep 24 15:31:02 running op script 'att_signalSN.slax' Sep 24 15:31:02 opening op script '/var/db/scripts/op/att_signalSN.slax' Sep 24 15:31:02 reading op script 'att_signalSN.slax' Sep 24 15:31:03 op script output Sep 24 15:31:03 begin dump <?xml version="1.0"?> <op-script-results xmlns:junos="https://xml.juniper.net/junos/*/junos" xmlns:xnm="https://xml.juniper.net/xnm/1.1/xnm" xmlns:jcs="https://xml.juniper.net/junos/commit-scripts/1.0" xmlns:ais="https://xml.juniper.net/ais"/> Sep 24 15:31:03 end dump Sep 24 15:31:03 inspecting op output 'att_signalSN.slax' Sep 24 15:31:03 finished op script 'att_signalSN.slax' Sep 24 15:31:03 op script processing ends
/var/log/csscript.log
—Thecscript.log
file records actions performed by the commit scripts included in the AI-Scripts bundle.Oct 5 11:27:10 cscript script processing begins Oct 5 11:27:10 reading commit script configuration Oct 5 11:27:10 testing commit script configuration Oct 5 11:27:10 opening commit script '/var/db/scripts/commit/jais-activate-scripts.slax' Oct 5 11:27:10 script file '/var/db/scripts/commit/jais-activate-scripts.slax': size = 205316 ; md5 = b71a394e7d983a8bf882da9b2993beef sha1 = b5e94f9c748ceeaa8925df32a0ca72c73a597912 sha-256 = 1b9f02cbfc3e93ba5c53e4838c42b6f999ae6c7acdb1bc169f57f2863afcf4da Oct 5 11:27:10 reading commit script 'jais-activate-scripts.slax' Oct 5 11:27:10 running commit script 'jais-activate-scripts.slax' Oct 5 11:27:17 processing commit script 'jais-activate-scripts.slax' Oct 5 11:27:17 no errors from jais-activate-scripts.slax Oct 5 11:27:17 saving commit script changes for script jais-activate-scripts.slax Oct 5 11:27:17 summary of script jais-activate-scripts.slax: changes 0, transients 2 (allowed), syslog 1 Oct 5 11:27:17 cscript script processing ends
/var/log/interactive-commands
—Theinteractive-commands
file is set up either by Junos OS or manually by a user to record CLI commands that are run on the device to generate a JMB.Sep 24 15:31:20 mx-2 mgd[77367]: UI_AUTH_EVENT: Authenticated user 'root' at permission level 'super-user' Sep 24 15:31:20 mx-2 mgd[77367]: UI_LOGIN_EVENT: User 'root' login, class 'super-user' [77367], ssh-connection '192.0.2.100 47460 192.0.2.4 22', client-mode 'cli' Sep 24 15:31:20 mx-2 mgd[77367]: UI_CMDLINE_READ_LINE: User 'root', command 'xml-mode netconf need-trailer ' Sep 24 15:31:20 mx-2 mgd[77367]: UI_LOGOUT_EVENT: User 'root' logout Sep 24 15:31:22 mx-2 file[77366]: UI_AUTH_EVENT: Authenticated user 'root' at permission level 'super-user' Sep 24 15:31:22 mx-2 file[77366]: UI_LOGIN_EVENT: User 'root' login, class 'super-user' [77366], ssh-connection '192.0.2.100 47460 192.0.2.4 22', client-mode 'netconf' Sep 24 15:31:22 mx-2 file[77366]: UI_NETCONF_CMD: User 'root' used NETCONF client to run command 'file-delete path=/var/tmp/mx-2-15-20150924-152558_ais_attach_logs_tgz' Sep 24 15:31:22 mx-2 file[77366]: UI_CHILD_START: Starting child '/bin/rm' Sep 24 15:31:22 mx-2 file[77366]: UI_CHILD_STATUS: Cleanup child '/bin/rm', PID 77368, status 0 Sep 24 15:31:22 mx-2 file[77366]: UI_NETCONF_CMD: User 'root' used NETCONF client to run command 'close-session' Sep 24 15:31:22 mx-2 file[77366]: UI_LOGOUT_EVENT: User 'root' logout
When an event occurs on a device, the log files inform Junos Space Platform about activities on the device. See the following for information about generation, collection, and processing of JMBs:
JMB Generation
The Junos OS event process (eventd) listens to events generated by Junos OS processes such as chassis process (chassid), routing protocol process (rpd), and device control process (dcd). When an event occurs, the eventd process scans the event table in the kernel and executes the script from the AI-Scripts bundle that matches the event. The eventd process uses criteria such as the name of the event, count of the event, or correlated events occurring within a specific time interval as a trigger to execute the event script.
An event script, when triggered, collects the manifest data
for an eJMB or the manifest and trend data for an iJMB and compiles
the data into a JMB. AI-Scripts collect attachments and logs separately
and store the JMB, attachments, and logs in the /var/tmp
directory of the device.
JMB Collection
When a JMB is generated and ready for collection, Service Now
receives the AIS_DATA_AVAILABLE: To be Transferred :
JMB ready for upload
system log message from the device.
The following is a sample of the log message received from an M10i
device:
AIS_PROCESSING: AI-Scripts Commit script completed AIS_DATA_AVAILABLE: JMB #1 generation initiated for eventID=998 AIS_PROCESSING: JMB #1 triggered by match with: interval_based_intelligence_event AIS_DATA_AVAILABLE: WARNING: Cannot update FIFO on re1 AIS_DATA_AVAILABLE: WARNING: Cannot update FIFO on re1 AIS_PROCESSING: JMB #1 is creating the ESI batch file AIS_PROCESSING: JMB #1 finished attachment: /var/tmp/M10i-r012-998-20150716-041856_ais_attach_2_cfg_xml size=8481 AIS_PROCESSING: JMB #1 finished attachment: /var/tmp/M10i-r012-998-2015s0716-041856_ais_attach_3_shd_xml size=4244 AIS_PROCESSING: JMB #1 finished attachment: /var/tmp/M10i-r012-998-20150716-041856_ais_attach_4_ver_xml size=9060 AIS_PROCESSING: JMB #1 finished the JMB file AIS_PROCESSING: Preparing to complete JMB file processing on Master RE AIS_DATA_AVAILABLE: To be Transferred : JMB ready for upload /var/tmp/M10i-r012_20150716_042018_998_jmb_ais_intel size=44657
In response to the AIS_DATA_AVAILABLE: To be
Transferred : JMB ready for upload system log message
received, Service Now collects the JMB from the device and copies
it to the /var/cache/jboss/SN/Jmb/output
folder of the Junos Space Appliance from where it is copied to the
Service Now database. Service Now collects the attachments and log
files separately after collecting the manifest and trend data (for iJMBs).
To collect the JMB, Service Now uses the NETCONF over the SSH channel that was created when the device was discovered. For information about the device discovery process, see Discovering Devices.
Service Now starts collecting attachments and logs for a JMB
when it receives the AIS_DATA_AVAILABLE: To be Transferred
: All attachments ready for upload
system log message
from the device. The following is a sample of the log message received
from the M10I device for collecting attachments:
AIS_PROCESSING: Starting ESI attachment for JMB #1 AIS_PROCESSING: JMB #1 finished attachment: /var/tmp/M10i-r012-998-20150716-041856_ais_attach_AISESI size=79200 AIS_PROCESSING: JMB #1 finished attachment: /var/tmp/M10i-r012-998-20150716-041856_ais_attach_statusmsgs size=1194 AIS_DATA_AVAILABLE: To be Transferred : All attachments ready for upload
AIS_DATA_AVAILABLE: To be Transferred : Attachment ready for upload /var/tmp/srx-210h-sn1_998_ais_intel_20150318_082027_ais_atta ch_5_rsi size=126355
After collecting the JMB, attachments or log files Service
Now sends the delete remote procedure call (RPC) to the device so that the device can delete files
after they are collected.. In response
to the delete RPC, the device deletes the specific files from its /var/tmp
directory.
If, for some reason, Service Now fails to collect the JMB, Service
Now attempts to collect the JMB when Service Now receives the next AIS_DATA_AVAILABLE: To be Transferred : JMB ready for upload
system log message from the device. At each attempt, Service Now
collects all JMBs present in the /var/tmp
folder of a device. Service Now attempts to collect failed attachments
once every two hours. See Junos Space Service Now and Junos Space Service Insight Timers for
information about timers that Service Now uses to retrieve data from the device and JSS.
JMB Processing
Service Now creates an incident for each JMB that it receives. You can view the incident and the JMB under the Incidents task of the Service Central workspace of the Service Now GUI. If required, you can manually submit the incident to JSS for creating a case or configure Service Now to automatically submit the incident. A case, when created for the incident, is listed under the View Tech Support Cases task on the Service Now GUI as shown in Figure 1.

A Service Now operating in End Customer mode submits incidents to a Service Now partner. The Service Now partner, if required, submits the end customer’s incidents to JSS. The Service Now partner can view cases created for end customer incidents under the View End Customer Cases task on the Service Now GUI.
JSS uses the information contained in the eJMBs to troubleshoot and resolve issues on devices. JSS uses the trend data contained in iJMBs to analyze and provide proactive bug notifications (PBNs) and send alerts to customers about devices and components nearing End of Life (EOL) or End of Service (EOS). Service Insight retrieves the PBNs and EOL and EOS alerts from JSS every midnight. The PBNs and alerts can be viewed in the Insight Central workspace of the Service Insight application.
JSS sends PBNs and alerts only to customers with a current Juniper Care or Juniper Care Plus service contract.
You can configure the duration for which an incident and JMB can be stored in the Service Now database on the Global Settings page of the Administration workspace. The incidents and JMBs are automatically deleted from the Service Now database after the specified time lapses.
Figure 2 shows a snapshot of the Global Settings page with a purge time configured for device snapshots and incidents.
