Identifying a cylindrical SMD component with two banded color markings
Component marking

These packages are called MELF (metal electrode leadless face). They're usually used for resistors and diodes.

The fact that there are only two color bands/rings makes them less likely to be resistors.

See Electronic color code on Wikipedia.

The missing third ring could be interpreted as zero (black), making the red-yellow component a 24 Ohm resistor.

Vishay uses two-ring color codes to mark their diodes. Here's an example:



Source

That would make the red-yellow component a BYM11-series 400V diode.

To be sure you should measure the components out-of-circuit.

In-circuit measurement

When measuring components in-curcuit, you should be aware that other components might influence your measurements. 

Examples:


low value resistances parallel to diode-under-test make them appear short-circuits
capacitors parallel to resistor-under-test make them look short-circuit with rising resistance


These are examples, there are more combinations.

Components are best tested out-of-circuit to be sure. When measuring in-circuit cannot be avoided keep the above in mind and suspect components to be a certain type.

Caution

When measuring components that connect to mains make sure you wait long enough to bleed existing charge off of capacitors. You might use Low-Z mode on a multimeter to test such capacitors and help discharging them using the low input impedance. Be aware of dielectric absorbition