Sharp pain.

I just suddenly got a sharp pain that goes and comes. It's in my back (right side) in the rib area. It kinda shoots through to my front. I have the normal lower back pain. Just wondering if this would be reason to be alarmed or if it's just gas or possibly a kidney infection..