How do you know whether or not the ballast is broken or the lamp is broken
If it's bright occasionally, it's a problem in the ballast. Generally speaking, the lamp tube is broken, it will not be bright.
The best and safest way is to have a match, a good lamp tube, or a ballast.
The best and safest way is to have a good bulb or ballast, change the try will know what is bad, if the occasional bright, in general is a question of tubes.