Giter Site home page Giter Site logo

Comments (12)

leiweibau avatar leiweibau commented on June 16, 2024

Does the scan log provide any helpful information?

from pi.alert.

ah92uk avatar ah92uk commented on June 16, 2024

Latest scan reads:

Pi.Alert 3.7.18 (2023-01-20)

Current User: virtual1

Scan Devices
ScanCycle: 1
Timestamp: 2023-01-22 19:40:00

Scanning...
arp-scan Method...
arp-scan: One interface
Pi-hole Method...
DHCP Leases Method...

Processing scan results...
Devices Detected.......: 3
arp-scan Method....: 0
Pi-hole Method.....: +0
New Devices........: 0

Devices in this cycle..: 3
Down Alerts........: 0
New Down Alerts....: 0
New Connections....: 0
Disconnections.....: 0
IP Changes.........: 0

Updating DB Info...
Sessions Events (connect / discconnect) ...
Creating new devices...
Updating Devices Info...
Trying to resolve devices without name....
Names updated: 0
Voiding false (ghost) disconnections...
Pairing session events (connection / disconnection) ...
Creating sessions snapshot...
Skipping repeated notifications...
Calculate Activity History...

Reporting...
Formating report...
No changes to report...
Notifications: 0

DONE!!!

from pi.alert.

leiweibau avatar leiweibau commented on June 16, 2024

And your Config File looks like this?

# Pi-hole Configuration
# ----------------------
PIHOLE_ACTIVE     = True
PIHOLE_DB         = '/etc/pihole/pihole-FTL.db'
DHCP_ACTIVE       = True
DHCP_LEASES       = '/etc/pihole/dhcp.leases'

from pi.alert.

ah92uk avatar ah92uk commented on June 16, 2024

DNS - yes, but PiHole isn't performing DHCP functions for my network, will that be an issue here?

Pi-hole Configuration

----------------------

PIHOLE_ACTIVE = True
PIHOLE_DB = '/etc/pihole/pihole-FTL.db'
DHCP_ACTIVE = False
DHCP_LEASES = '/etc/pihole/dhcp.leases'

I notice the FAQ about /etc/sudoers, which I've applied - does this or other permissioning have influence on Pialert being able to read pihole-FTL.db? In my system, pihole-FTL.db is in the location specified above, whilst pialert is in /home/virtual1/pialert - not sure if that'd make a difference?

from pi.alert.

leiweibau avatar leiweibau commented on June 16, 2024

DNS - yes, but PiHole isn't performing DHCP functions for my network, will that be an issue here?

I dont think so.

does this or other permissioning have influence on Pialert being able to read pihole-FTL.db?

I could imagine that. But I don't have the time to set up an Ubuntu Server VM and play through the different configurations at the moment. I hope you have understanding for this.

What I would test in your place, would be:

  • Create a backup of the config
  • copy the database /etc/pihole/pihole-FTL.db into the user directory of "virtual1"
  • Change the permissions for "virtual1"
  • Change the path in the config to the current location of the new database copy.

If this works, it will be a permissions problem and you can work on a solution

from pi.alert.

ah92uk avatar ah92uk commented on June 16, 2024

What I would test in your place, would be:

Create a backup of the config
copy the database /etc/pihole/pihole-FTL.db into the user directory of "virtual1"
Change the permissions for "virtual1"
Change the path in the config to the current location of the new database copy.

I've tried this with no luck unfortunately, I located the .db file within the /pialert directory and pointed Pi.Alert to the new location and still no PiHole DNS clients are found by Pi.Alert.

I've also reviewed the permissions and pihole-FTL.db has read permissions across owner, group and other/ world so that shouldn't be an issue from a basic file access perspective.

I'll have a look at sudoers.d in a little more detail and try a few rules, PiHole has an entry in there so I'm wondering perhaps some of the database operations between PiAlert and PiHole's .db needs sudo similar to the arp-scan FAQ mentioned above?

from pi.alert.

leiweibau avatar leiweibau commented on June 16, 2024

I just installed an Ubuntu server 22.04.1 in a VM and to it. Using the install script from my fork, I installed Pi-Hole and Pi.Alert. I have not added the sudo modification here yet. After a few minutes the first devices appeared. In the "Events" I see that apparently some data from Pi-Hole are taken over (arp-scan was not executed because of missing sudo).

screenshot

from pi.alert.

ah92uk avatar ah92uk commented on June 16, 2024

Very odd - it must be my configuration somewhere? I've uninstalled and reinstalled both PiHole and PiAlert completely and still face the same issue.

If you have time and wouldn't mind, could you ls -l the /pialert/back and /etc/pihole directories and let me know your pialert.conf settings please?

from pi.alert.

leiweibau avatar leiweibau commented on June 16, 2024

Hello,

sorry it took a while. But instead I have looked into the topic a little more closely. I had to set up the VM from last time again first.

Environment:

  • Ubuntu Server 22.04.1
  • User is not yet configured as sudoer
  • Network of the VM is isolated

Test scenario:

  • Pi-hole database of a productive instance backed up
  • Database copied to the VM
  • With the next cronjob the devices showed up in the Pi.Alert device list

Conclusion:

Processing scan results....
Devices Detected.......: 3
arp-scan Method....: 0
Pi-hole Method.....: +0
New Devices........: 1
  • Despite adding the new hosts, the Pi-hole Method shows "0" (I'm not through the Python code yet, but think this counter only affects the DHCP server function of Pi-hole.)
  • You can recognize the hosts from the Pi-hole database by "(Pi-Hole)" in the event list
  • In case of questions, I let the VM exist for now

from pi.alert.

ah92uk avatar ah92uk commented on June 16, 2024

Hi,

Thanks for looking into this in more detail! The instance I'm running still doesn't seem to function despite various attempts to play around with the permissioning, sudoers etc. and reinstall.

I've also tried forcing the Pihole process by modifying the code to remove the "if" functions and moving the Pihole copy function as part of the main always-executed code, to no avail.

The ARP scanning works fine for me and I can scan the management VLAN it resides within but the Pihole connectivity just doesn't seem to be there.

It must be something to do with my machine, so this could be closed as a niche issue?

from pi.alert.

leiweibau avatar leiweibau commented on June 16, 2024

Before I delete the VM, is there anything else you want to know?

from pi.alert.

ah92uk avatar ah92uk commented on June 16, 2024

No thankyou!

from pi.alert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.