Contemporary temperature measurement in Junos

In order to contemporary measure temprature on junos device , you’ll need to send specific SNMP traps to the SNMP clients configured on the junos device . In this article I’ll take EX switch 12.3R9 as an example.

First, configure the SNMP client/s and other configurations related to our situation:

set snmp client-list SNMP-RO 10.1.1.1/32
set snmp community TEST-ro authorization read-only
set snmp community TEST-ro client-list-name SNMP-RO
set snmp trap-options source-address 10.1.99.254
set snmp trap-group TEST-ro version v2

While 10.1.1.1 is the server which is pulling out this traps, e.g : PRTG

You need to know which temprature you need to pull. So run the command: show chassis environment on the EX switch:

Screenshot_14

Now, you need to find the related OID for this temprature, follow KB17526 to find this out. You’ll see it is : jnxOperatingTemp . and it is 1.3.6.1.4.1.2636.3.1.13.1.7

So run this command on switch to find the full OID of the specific FPC / sensor :

sh sn mib walk 1.3.6.1.4.1.2636.3.1.13.1.7

Screenshot_14

So you’ll need to run on the SNMP server (for example PRTG server) the following OID:

1.3.6.1.4.1.2636.3.1.13.1.7.7.1.0.0 in order to get contemporary temprature on FPC 0 Sensor CPU Die Temp

Note: There is no specific values as timeout. The moment when the command is issued the temperature output are collected from the device when the help of sensors.

Changing temperature thresholds on EX switch

Since we wanted to receive alarms from Junos Space / Network Director about tempretures on EX switches , its possible . But if you want to receive temp. alarms once switch reaches specific temp. , then it need to be confgured on the EX .

 

Note: Change of Temperature thresholds on EX switch is not recommended by JTAC.

 

Tested by me on EX switch 3300 , JunOS: 12.3R9

 

This is hidden command , so type “set chassis temperature-threshold ?” at once

 

{master:0}[edit]
master@SW-EX3300# set chassis temp
^
syntax error.
master@SW-EX3300# set chassis temperature-threshold ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
+ apply-groups-except Don’t inherit configuration data from these groups
fire-shutdown Threshold at which router will be shutdown within 10 seconds (degrees C)
red-alarm Threshold at which red alarm is set (degrees C)
red-alarm-if-failed-fan Threshold at which red alarm is set when bad fan present (degrees C)
yellow-alarm Threshold at which yellow alarm is set (degrees C)
yellow-alarm-if-failed-fan Threshold at which yellow alarm is set when bad fan present (degrees C)
{master:0}[edit]
master@SW-EX3300# set chassis temperature-threshold red-alarm ?
Possible completions:
<red-alarm> Threshold at which red alarm is set (degrees C)
{master:0}[edit]

‘admin’ password reset for a Space VM instance

You will have to reboot the VM instance and once it is coming UP, please get into the ‘greb’ menu and follow the below steps:

Access the grub menu & edit it with ‘e’

1.png

The default grub protection username & password is root/abc123

2.png

 

 

 

Default grub menu options will be displayed after this as shown below ,

3.png

 

 

Remove the entries after “root=/dev/mapper/jmpvgnocf-lvroot” in kernel line with init=/bin/bash as shown below ,

Original line:

Linux /vmlinuz-2.6.32-100.24.1.el5 root=/dev/mapper/jmpvgnocf-lvroot ro /

console =tty1 console=ttys0,9600n8 acpi_enforce_resources=lax

 

Modified line:

Linux /vmlinuz-2.6.32-100.24.1.el5 root=/dev/mapper/jmpvgnocf-lvroot  init=/bin/bash

 

4

Boot in to the system with Ctrl-x or F10 & make the file system rw with “mount –o remount,rw /” command.

5.png

 

 

Finally change admin password with “passwd admin” command then exit & reboot the system.

6.pngNote: Grub mode protection is enabled with either “password” or “pbkdf” mode passwords in 13.x ,search for password in /boot/grub/grub.cfg file & replace  the password with the one   created with either “grub-mkpasswd-pbkdf2” or “grub-md5-crypt” for changing the default password.

 

** Many thanks to Lijo K. from Juniper support for sharing those information with me**

Abed AL-R. B.