Page 2 of 2

Re: alerting in NA

Posted: Wed May 23, 2018 7:35 am
by insightcu
all my sources started with no problem and i am not seeing any errors. nothing showing in the dashboard had this issue before when i was testing out nagios and i had redeploy the appliance. i think there is a bug i only made this change and everything stop working

Code: Select all

def send_email(recipient, subject, body):
    FROM = <[email protected]>
    msg = MIMEText(body)
    msg['Subject'] = subject
    msg['From'] = FROM
    msg['To'] = recipient
    
    s = smtplib.SMTP('10.200.1.53',25)
    s.sendmail(FROM, [recipient], msg.as_string())
    s.quit()
/flows, nfcapd.201805221540, 3
2018-05-22 15:45:10 DEBUG : Running checks...
2018-05-22 15:45:10 DEBUG : Getting relevant checks for source id: 3
2018-05-22 15:45:10 DEBUG : Checks found: ()
2018-05-22 15:45:10 INFO : Ran checks successfully
2018-05-22 15:45:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:45:10 INFO : Parsing data for the source id: 23
2018-05-22 15:45:10 DEBUG : Arguments: /usr/local/nagiosna/var/EVOLVECLOUDFW/flo
ws, nfcapd.201805221540, 23
2018-05-22 15:45:10 DEBUG : Running checks...
2018-05-22 15:45:10 DEBUG : Getting relevant checks for source id: 23
2018-05-22 15:45:10 DEBUG : Checks found: ()
2018-05-22 15:45:10 INFO : Ran checks successfully
2018-05-22 15:45:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:45:10 INFO : Parsing data for the source id: 17
2018-05-22 15:45:10 DEBUG : Arguments: /usr/local/nagiosna/var/MARSWMDF/flows, n
fcapd.201805221540, 17
2018-05-22 15:45:10 INFO : Parsing data for the source id: 15
2018-05-22 15:45:10 DEBUG : Arguments: /usr/local/nagiosna/var/HUNSWMDF/flows, n
fcapd.201805221540, 15
2018-05-22 15:45:10 DEBUG : Running checks...
2018-05-22 15:45:10 DEBUG : Getting relevant checks for source id: 17
2018-05-22 15:45:10 DEBUG : Running checks...
2018-05-22 15:45:10 DEBUG : Getting relevant checks for source id: 15
2018-05-22 15:45:10 DEBUG : Checks found: ()
2018-05-22 15:45:10 INFO : Ran checks successfully
2018-05-22 15:45:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:45:10 DEBUG : Checks found: ()
2018-05-22 15:45:10 INFO : Ran checks successfully
2018-05-22 15:45:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:45:10 INFO : Parsing data for the source id: 22
2018-05-22 15:45:10 DEBUG : Arguments: /usr/local/nagiosna/var/HILSWMDF/flows, n
fcapd.201805221540, 22
2018-05-22 15:45:10 INFO : Parsing data for the source id: 8
2018-05-22 15:45:10 DEBUG : Arguments: /usr/local/nagiosna/var/WHOSWMDF250/flows
, nfcapd.201805221540, 8
2018-05-22 15:45:10 DEBUG : Running checks...
2018-05-22 15:45:10 DEBUG : Getting relevant checks for source id: 22
2018-05-22 15:45:10 DEBUG : Checks found: ()
2018-05-22 15:45:10 INFO : Ran checks successfully
2018-05-22 15:45:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:45:10 DEBUG : Running checks...
2018-05-22 15:45:10 DEBUG : Getting relevant checks for source id: 8
2018-05-22 15:45:10 DEBUG : Checks found: ()
2018-05-22 15:45:10 INFO : Ran checks successfully
2018-05-22 15:45:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:45:10 INFO : Parsing data for the source id: 11
2018-05-22 15:45:10 DEBUG : Arguments: /usr/local/nagiosna/var/EUSSWMDF/flows, n
fcapd.201805221540, 11
2018-05-22 15:45:10 DEBUG : Running checks...
2018-05-22 15:45:10 DEBUG : Getting relevant checks for source id: 11
2018-05-22 15:45:10 DEBUG : Checks found: ()
2018-05-22 15:45:10 INFO : Ran checks successfully
2018-05-22 15:45:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:00 INFO : Parsing data for the source id: 1
2018-05-22 15:50:00 DEBUG : Arguments: /usr/local/nagiosna/var/LEESWMDF/flows, n
fcapd.201805221545, 1
2018-05-22 15:50:00 DEBUG : Running checks...
2018-05-22 15:50:00 DEBUG : Getting relevant checks for source id: 1
2018-05-22 15:50:00 DEBUG : Checks found: (('LEETRAFFICMONITOR', 2L, '10000000',
 '12000000', 'bytes', 'net 192.168.5.0/24', 'LEESWMDF', 1L, None, None, None),)
2018-05-22 15:50:00 DEBUG : Sid was set, looking in raw sources
2018-05-22 15:50:00 DEBUG : Running nfdump - /usr/local/bin/nfdump -r /usr/local
/nagiosna/var/LEESWMDF/flows/nfcapd.201805221545 -o csv -s srcip net 192.168.5.0
/24
2018-05-22 15:50:00 DEBUG : Setting title to: LEESWMDF
2018-05-22 15:50:00 DEBUG : Value was found to be: 365828096
2018-05-22 15:50:00 DEBUG : Returncode will be: 2
2018-05-22 15:50:00 INFO : Parsing data for the source id: 22
2018-05-22 15:50:00 DEBUG : Arguments: /usr/local/nagiosna/var/HILSWMDF/flows, n
fcapd.201805221545, 22
2018-05-22 15:50:00 INFO : Ran checks successfully
2018-05-22 15:50:00 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:00 DEBUG : Running checks...
2018-05-22 15:50:00 DEBUG : Getting relevant checks for source id: 22
2018-05-22 15:50:00 DEBUG : Checks found: ()
2018-05-22 15:50:00 INFO : Ran checks successfully
2018-05-22 15:50:00 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:00 INFO : Parsing data for the source id: 11
2018-05-22 15:50:00 DEBUG : Arguments: /usr/local/nagiosna/var/EUSSWMDF/flows, n
fcapd.201805221545, 11
2018-05-22 15:50:00 DEBUG : Running checks...
2018-05-22 15:50:00 DEBUG : Getting relevant checks for source id: 11
2018-05-22 15:50:00 DEBUG : Checks found: ()
2018-05-22 15:50:00 INFO : Ran checks successfully
2018-05-22 15:50:00 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:00 INFO : Parsing data for the source id: 5
2018-05-22 15:50:00 DEBUG : Arguments: /usr/local/nagiosna/var/CLRSWMDF/flows, n
fcapd.201805221545, 5
2018-05-22 15:50:00 DEBUG : Running checks...
2018-05-22 15:50:00 DEBUG : Getting relevant checks for source id: 5
2018-05-22 15:50:00 DEBUG : Checks found: ()
2018-05-22 15:50:00 INFO : Ran checks successfully
2018-05-22 15:50:00 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:00 INFO : Parsing data for the source id: 7
2018-05-22 15:50:00 DEBUG : Arguments: /usr/local/nagiosna/var/WHOSWMDF260/flows
, nfcapd.201805221545, 7
2018-05-22 15:50:00 DEBUG : Running checks...
2018-05-22 15:50:00 DEBUG : Getting relevant checks for source id: 7
2018-05-22 15:50:00 DEBUG : Checks found: ()
2018-05-22 15:50:00 INFO : Ran checks successfully
2018-05-22 15:50:00 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:01 INFO : Parsing data for the source id: 18
2018-05-22 15:50:01 DEBUG : Arguments: /usr/local/nagiosna/var/OTDSWMDF/flows, n
fcapd.201805221545, 18
2018-05-22 15:50:01 DEBUG : Running checks...
2018-05-22 15:50:01 DEBUG : Getting relevant checks for source id: 18
2018-05-22 15:50:01 DEBUG : Checks found: ()
2018-05-22 15:50:01 INFO : Ran checks successfully
2018-05-22 15:50:01 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:01 INFO : Parsing data for the source id: 4
2018-05-22 15:50:01 DEBUG : Arguments: /usr/local/nagiosna/var/CLASWMDF/flows, n
fcapd.201805221545, 4
2018-05-22 15:50:01 DEBUG : Running checks...
2018-05-22 15:50:01 DEBUG : Getting relevant checks for source id: 4
2018-05-22 15:50:01 DEBUG : Checks found: ()
2018-05-22 15:50:01 INFO : Ran checks successfully
2018-05-22 15:50:01 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:02 INFO : Parsing data for the source id: 6
2018-05-22 15:50:02 DEBUG : Arguments: /usr/local/nagiosna/var/WHOSWMDF270/flows
, nfcapd.201805221545, 6
2018-05-22 15:50:02 DEBUG : Running checks...
2018-05-22 15:50:02 DEBUG : Getting relevant checks for source id: 6
2018-05-22 15:50:02 DEBUG : Checks found: ()
2018-05-22 15:50:02 INFO : Ran checks successfully
2018-05-22 15:50:02 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:02 INFO : Parsing data for the source id: 2
2018-05-22 15:50:02 DEBUG : Arguments: /usr/local/nagiosna/var/APOSWMDF/flows, n
fcapd.201805221545, 2
2018-05-22 15:50:02 DEBUG : Running checks...
2018-05-22 15:50:02 DEBUG : Getting relevant checks for source id: 2
2018-05-22 15:50:02 DEBUG : Checks found: ()
2018-05-22 15:50:02 INFO : Ran checks successfully
2018-05-22 15:50:02 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:02 INFO : Parsing data for the source id: 20
2018-05-22 15:50:02 DEBUG : Arguments: /usr/local/nagiosna/var/WILSWMDF/flows, n
fcapd.201805221545, 20
2018-05-22 15:50:02 DEBUG : Running checks...
2018-05-22 15:50:02 DEBUG : Getting relevant checks for source id: 20
2018-05-22 15:50:02 DEBUG : Checks found: ()
2018-05-22 15:50:02 INFO : Ran checks successfully
2018-05-22 15:50:02 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:02 INFO : Parsing data for the source id: 10
2018-05-22 15:50:02 DEBUG : Arguments: /usr/local/nagiosna/var/OCASWMDF/flows, n
fcapd.201805221545, 10
2018-05-22 15:50:02 DEBUG : Running checks...
2018-05-22 15:50:02 DEBUG : Getting relevant checks for source id: 10
2018-05-22 15:50:02 DEBUG : Checks found: ()
2018-05-22 15:50:02 INFO : Ran checks successfully
2018-05-22 15:50:02 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:03 INFO : Parsing data for the source id: 9
2018-05-22 15:50:03 DEBUG : Arguments: /usr/local/nagiosna/var/WHOSWMDF240/flows
, nfcapd.201805221545, 9
2018-05-22 15:50:03 DEBUG : Running checks...
2018-05-22 15:50:03 DEBUG : Getting relevant checks for source id: 9
2018-05-22 15:50:03 DEBUG : Checks found: ()
2018-05-22 15:50:03 INFO : Ran checks successfully
2018-05-22 15:50:03 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:05 INFO : Parsing data for the source id: 21
2018-05-22 15:50:05 DEBUG : Arguments: /usr/local/nagiosna/var/OVDSWMDF/flows, n
fcapd.201805221545, 21
2018-05-22 15:50:05 DEBUG : Running checks...
2018-05-22 15:50:05 DEBUG : Getting relevant checks for source id: 21
2018-05-22 15:50:05 DEBUG : Checks found: ()
2018-05-22 15:50:05 INFO : Ran checks successfully
2018-05-22 15:50:05 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:07 INFO : Parsing data for the source id: 12
2018-05-22 15:50:07 DEBUG : Arguments: /usr/local/nagiosna/var/LDKSWMDF/flows, n
fcapd.201805221545, 12
2018-05-22 15:50:07 DEBUG : Running checks...
2018-05-22 15:50:07 DEBUG : Getting relevant checks for source id: 12
2018-05-22 15:50:07 DEBUG : Checks found: ()
2018-05-22 15:50:07 INFO : Ran checks successfully
2018-05-22 15:50:07 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:09 INFO : Parsing data for the source id: 8
2018-05-22 15:50:09 DEBUG : Arguments: /usr/local/nagiosna/var/WHOSWMDF250/flows
, nfcapd.201805221545, 8
2018-05-22 15:50:09 DEBUG : Running checks...
2018-05-22 15:50:09 DEBUG : Getting relevant checks for source id: 8
2018-05-22 15:50:09 DEBUG : Checks found: ()
2018-05-22 15:50:09 INFO : Ran checks successfully
2018-05-22 15:50:09 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:10 INFO : Parsing data for the source id: 13
2018-05-22 15:50:10 DEBUG : Arguments: /usr/local/nagiosna/var/CFVSWMDF/flows, n
fcapd.201805221545, 13
2018-05-22 15:50:10 DEBUG : Running checks...
2018-05-22 15:50:10 DEBUG : Getting relevant checks for source id: 13
2018-05-22 15:50:10 DEBUG : Checks found: ()
2018-05-22 15:50:10 INFO : Ran checks successfully
2018-05-22 15:50:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:10 INFO : Parsing data for the source id: 3
2018-05-22 15:50:10 DEBUG : Arguments: /usr/local/nagiosna/var/EVOLVEFWDATACENTE
R/flows, nfcapd.201805221545, 3
2018-05-22 15:50:10 DEBUG : Running checks...
2018-05-22 15:50:10 DEBUG : Getting relevant checks for source id: 3
2018-05-22 15:50:10 DEBUG : Checks found: ()
2018-05-22 15:50:10 INFO : Ran checks successfully
2018-05-22 15:50:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:10 INFO : Parsing data for the source id: 16
2018-05-22 15:50:10 DEBUG : Arguments: /usr/local/nagiosna/var/INVSWMDF/flows, n
fcapd.201805221545, 16
2018-05-22 15:50:10 DEBUG : Running checks...
2018-05-22 15:50:10 DEBUG : Getting relevant checks for source id: 16
2018-05-22 15:50:10 DEBUG : Checks found: ()
2018-05-22 15:50:10 INFO : Ran checks successfully
2018-05-22 15:50:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:10 INFO : Parsing data for the source id: 14
2018-05-22 15:50:10 DEBUG : Arguments: /usr/local/nagiosna/var/DELSWMDF/flows, n
fcapd.201805221545, 14
2018-05-22 15:50:10 DEBUG : Running checks...
2018-05-22 15:50:10 DEBUG : Getting relevant checks for source id: 14
2018-05-22 15:50:10 DEBUG : Checks found: ()
2018-05-22 15:50:10 INFO : Ran checks successfully
2018-05-22 15:50:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:10 INFO : Parsing data for the source id: 23
2018-05-22 15:50:10 DEBUG : Arguments: /usr/local/nagiosna/var/EVOLVECLOUDFW/flo
ws, nfcapd.201805221545, 23
2018-05-22 15:50:10 DEBUG : Running checks...
2018-05-22 15:50:10 DEBUG : Getting relevant checks for source id: 23
2018-05-22 15:50:10 DEBUG : Checks found: ()
2018-05-22 15:50:10 INFO : Ran checks successfully
2018-05-22 15:50:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:10 INFO : Parsing data for the source id: 19
2018-05-22 15:50:10 DEBUG : Arguments: /usr/local/nagiosna/var/VILSWMDF/flows, n
fcapd.201805221545, 19
2018-05-22 15:50:10 INFO : Parsing data for the source id: 17
2018-05-22 15:50:10 DEBUG : Arguments: /usr/local/nagiosna/var/MARSWMDF/flows, n
fcapd.201805221545, 17
2018-05-22 15:50:10 INFO : Parsing data for the source id: 15
2018-05-22 15:50:10 DEBUG : Arguments: /usr/local/nagiosna/var/HUNSWMDF/flows, n
fcapd.201805221545, 15
2018-05-22 15:50:10 DEBUG : Running checks...
2018-05-22 15:50:10 DEBUG : Getting relevant checks for source id: 19
2018-05-22 15:50:10 DEBUG : Checks found: ()
2018-05-22 15:50:10 INFO : Ran checks successfully
2018-05-22 15:50:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:10 DEBUG : Running checks...
2018-05-22 15:50:10 DEBUG : Getting relevant checks for source id: 17
2018-05-22 15:50:10 DEBUG : Running checks...
2018-05-22 15:50:10 DEBUG : Getting relevant checks for source id: 15
2018-05-22 15:50:10 DEBUG : Checks found: ()
2018-05-22 15:50:10 INFO : Ran checks successfully
2018-05-22 15:50:10 DEBUG : Checks found: ()
2018-05-22 15:50:10 INFO : Successfully reaped nfcapd file.
2018-05-22 15:50:10 INFO : Ran checks successfully
2018-05-22 15:50:10 INFO : Successfully reaped nfcapd file.

Re: alerting in NA

Posted: Wed May 23, 2018 8:38 am
by insightcu
no data in the dashboard

Re: alerting in NA

Posted: Wed May 23, 2018 3:03 pm
by tgriep
I went through the Email document on my system and all of the sources continued to run and gather flow data.

One thing I see from the backend.log file you posted is that the single quotes around the FROM option look like they are missing that is causing an error.

Edit the /usr/local/nagiosna/bin/notify.py file again and make sure the field looks like the following. Then restart the services by running

Code: Select all

service nagiosna restart
Give the system 5 to 10 minutes to gather new data and post if the sources are displaying data.

Re: alerting in NA

Posted: Fri May 25, 2018 7:18 am
by insightcu
wow thank you i worked with 2 different guys at nagios noone could figure this out. now i am getting email with alert stating its critical how can i fix that


Alex Alexandre,

The source LEESWMDF has been evaluated for flows given the following query:

net 192.168.5.0/24

Looking at the number results (bytes) the check has returned as CRITICAL

Check output:

bytes on LEESWMDF with filter [net 192.168.5.0/24] is 181885952 | bytes=181885952;10000000;12000000;0

- Nagios Network Analyzer

Re: alerting in NA

Posted: Fri May 25, 2018 8:43 am
by tgriep
Your welcome. Glad it is working.
The Threshold setting for that Alert is lower than the actual bytes the Alert is checking so you will have to go back the Alerts menu, edit the Alert and increase the Warning and Critical Thresholds.