Taanis3: 4
וְכֵן עִיר שֶׁיֶּשׁ בָּהּ דֶּבֶר אוֹ מַפֹּלֶת — אוֹתָהּ הָעִיר מִתְעַנָּה וּמַתְרַעַת, וְכָל סְבִיבוֹתֶיהָ מִתְעַנּוֹת וְלֹא מַתְרִיעוֹת. רַבִּי עֲקִיבָא אוֹמֵר: מַתְרִיעוֹת וְלֹא מִתְעַנּוֹת. אֵיזֶהוּ דֶבֶר? עִיר הַמּוֹצִיאָה חֲמֵשׁ מֵאוֹת רַגְלִי, וְיָצְאוּ מִמֶּנָּה שְׁלֹשָׁה מֵתִים בִּשְׁלֹשָׁה יָמִים זֶה אַחַר זֶה — הֲרֵי זֶה דֶּבֶר; פָּחוֹת מִכָּאן — אֵין זֶה דֶּבֶר.
Similarly, a city in which there is pestilence or collapse [of buildings], that city must fast and sound [the shofar], and all surrounding areas fast but do not sound [the shofar]. R' Akiva says: They sound [the shofar] but do not fast. What is considered pestilence? [In] a city that can bring forth five hundred [men] on foot, [if] three [men] died on three successive days, it is considered pestilence. Fewer than this is not considered pestilence.
Taanis3: 5
עַל אֵלּוּ מַתְרִיעִין בְּכָל מָקוֹם: עַל הַשִּׁדָּפוֹן וְעַל הַיֵּרָקוֹן, עַל הָאַרְבֶּה וְעַל הֶחָסִיל, וְעַל חַיָּה רָעָה וְעַל הַחֶרֶב. מַתְרִיעִין עָלֶיהָ מִפְּנֵי שֶׁהִיא מַכָּה מְהַלֶּכֶת.
For these [plagues] we sound [the shofar] everywhere: For windblasts, and for yellowing [of grain]; for numerous-locusts and for finishing-locusts; for a wild beast, or for the sword. We sound [the shofar] on these occasions because each is considered a traveling plague.