The war is undoubtedly a key factor, but the more I read about it the more I think that it was a crucial factor due to how Nicholas left to coordinate the war effort. This left St Petersburg isolated with the Tsarina and Rasputin controlling things, which was never going to end well.
I roll my eyes whenever someone mentions Rasputin.It's like blaming the holocaust on Hitler's astrologer. Sometimes one gets other hypotheses like "well, it wouldn't have happened if this tiny condition were different."
However much fun it is to speculate about palace intrigues, the fact is that the Russian system was rotten to the core. Revolution of some kind was inevitable, and we know that because it had already happened. The Revolution of 1905 revealed the weaknesses of the imperial system, and took two years to bloodily repress. The war certainly did help speed things along, but it's hard to imagine an alternate history where Tsardom survives.